Yes, this can be done via cmd line. I am awaiting the marketplace to publish my exe for this purpose.
Below is the back end powershell used to export it. You could run this while the exe is being reviewed.
#############################################################################################################
NAME: UiPath_Analyzer_2020_10.ps1
AUTHOR: Schneider, Robert
DATE: 09/16/2021
This script allows user to select correct project.json file for uipath analyzer output
VERSION HISTORY:
1.0 Initial Version
2.0 Updates for resiliency and exe
#############################################################################################################
try{
###########################
#Setting Variables #
###########################
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent #set the current path of the script
$continue = “Yes”
$useroutput = $null
$outputpath = $null
$projectjson2 = $null
$param = $null
$par = $null
$output = $null
$error.Clear()
##########################
#CHecking User Session #
##########################
$wshell = New-Object -ComObject Wscript.Shell
$wshell.Popup(“PLEASE SELECT THE UIPATH PROJECT.JSON FILE”,0,"")|Out-Null
Add-Type -AssemblyName System.Windows.Forms
$FileBrowser = New-Object System.Windows.Forms.OpenFileDialog -Property @{
Multiselect = $false # Multiple files can be chosen
Filter = ‘UiPath Project.json (.json)|.json’ # Specified file types
}
[void]$FileBrowser.ShowDialog()
$projectjson = $FileBrowser.FileName
if ([string]::IsNullOrEmpty($projectjson) -eq $true) {
$wshell = New-Object -ComObject Wscript.Shell
$wshell.Popup(“YOU DID NOT SELECT A UIPATH PROJECT.JSON FILE. PLEASE TRY AGAIN.”,0,“Error”)|Out-Null
exit
}
Add-Type -AssemblyName Microsoft.VisualBasic
$usecase = [Microsoft.VisualBasic.Interaction]::InputBox(“Enter Use Case Name”, “Use Case Name”, “”)
if([string]::IsNullOrEmpty($usecase) -eq $true)
{$wshell.Popup(“YOU DID NOT ENTER A NAME. PLEASE TRY AGAIN.”,0,“Error”)|Out-Null #writing error message to user popup window
exit
}
If ((Test-Path ‘C:\Program Files\UiPath\Studio\UiPath.Studio.CommandLine.exe’) -eq $true){
$path = ‘C:\Program Files\UiPath\Studio\UiPath.Studio.CommandLine.exe’
$outputpath = “C:\users$env:USERNAME\Desktop”+$usecase+“Analyzer”+(Get-Date -Format MM_dd_yy_hh_mm_ss)+".txt"
$projectjson2 = ‘"’+"-p $projectjson"+’"’
$param = “,analyze,$projectjson2”
$par = $param.Split(",")
$output = & $path $par
$outputclean = ($output.Replace(’#json’,"").Replace(’"’,"").replace(’{’,’’).replace(’}’,’’) -Replace ‘.*FilePath’,’, , , ,FilePath’).split(’,’)
$outputclean |Out-File $outputpath
}
If ((Test-Path ‘C:\Program Files (x86)\UiPath\Studio\UiPath.Studio.CommandLine.exe’) -eq $true){
$path = ‘C:\Program Files (x86)\UiPath\Studio\UiPath.Studio.CommandLine.exe’
$outputpath = “C:\users$env:USERNAME\Desktop”+$usecase+“Analyzer”+(Get-Date -Format MM_dd_yy_hh_mm_ss)+".txt"
$projectjson2 = ‘"’+"-p $projectjson"+’"’
$param = “,analyze,$projectjson2”
$par = $param.Split(",")
$output = & $path $par
$outputclean = ($output.Replace(’#json’,"").Replace(’"’,"").replace(’{’,’’).replace(’}’,’’) -Replace ‘.*FilePath’,’, , , ,FilePath’).split(’,’)
$outputclean |Out-File $outputpath
}
Add-Type -AssemblyName PresentationCore,PresentationFramework
$PopUp = [System.Windows.MessageBox]::Show("$error",“Results”,0,0)
}
catch{
Add-Type -AssemblyName PresentationCore,PresentationFramework
$Error_Check = [System.Windows.MessageBox]::Show(“Do you want to view errors?”,“Error Report”,4,0)
if($error_check -eq “Yes”)
{
$date = Get-Date -Format “mmddyyhhss”
$error | export-csv C:\Users$env:USERNAME\Desktop\Error_$Date.csv
Add-Type -AssemblyName PresentationCore,PresentationFramework
$Error_Output = [System.Windows.MessageBox]::Show(“Errors have been exported to: C:\Users$env:USERNAME\Desktop\Error_$Date.csv”,“Error Report”,0,0)
}
}