Hi Andrew,
recently I've been aware of some errors trying to execute some of my defined applications on NS that use variables declarations.
Example:
Application Title: U|User|Unlock|Account|Parameters Not Required
Command Line: cmd /k "%Joeware_VAR\Unlock.exe" . [Logged User]
Variable: Joeware_VAR
Value: \PortableApps\Administrative_Utils\NirLauncher\Joeware Tools
To debug the strange behavior of the unlock tool of joeware I used the echo command to found what NS was replacing for the %Joeware_VAR variable.
Echo results:
cmd /k ""\PortableApps\Administrative_Utils\NirLauncher\Joeware Tools"\Unlock.exe" . [Logged User]
To work results should be:
cmd /k "\PortableApps\Administrative_Utils\NirLauncher\Joeware Tools\Unlock.exe" . [Logged User]
without the extra quotes ("").
Thanks.
All Forums
> Network Scanner
> Current topic
Extra quotes in variables
Started by rmpf2
rmpf2
Extra quotes in variables 02 June 2016, 02:25 |
Re: Extra quotes in variables 02 June 2016, 08:34 |
Admin Registered: 18 years ago Posts: 3 519 |
Looks like a a bug. Try the new build, it now doesn't quote variables whose value contains a space if those variables are already used in quotes.
rmpf2
Extra quotes in variables 03 June 2016, 06:36 |
Thanks. For the case exposed it works but for the following case remain a similar issue.
Application Title: W|WMI|SimpleWMIView - Displays results of WMI simple queries|Synchronous Mode|Namespace|root\CIMV2|Class|WIN32_Process|Report|Scomma Format File|Sort By|CommandLine
Command Line:
cmd /k echo """%NirSoft_VAR\SimpleWMIView.exe" /ConnectComputer 2 /ComputerName {Enter Computer Name:[Host Name]} /SyncMode 2 /Namespace "root\CIMV2" /Class "WIN32_Process" /scomma "%NirSoft_VAR\SimpleWMIView_Reports\%0_[Host Name]_[WMI - ComputerSystem_User Online]_%date:~10,4%-%date:~4,2%-%date:~7,2%_Processes_Report.csv" /Sort "CommandLine"" & "%NirSoft_VAR\CSVFileView.exe" /load "%NirSoft_VAR\SimpleWMIView_Reports\%0_[Host Name]_[WMI - ComputerSystem_User Online]_%date:~10,4%-%date:~4,2%-%date:~7,2%_Processes_Report.csv""
Echo results:
"""\PortableApps\WSCCPortable\App\WSCC\NirSoft Utilities\SimpleWMIView.exe" /ConnectComputer 2 /ComputerName drd-42942 /SyncMode 2 /Namespace "root\CIMV2" /Class "WIN32_Process" /scomma "\PortableApps\WSCCPortable\App\WSCC\NirSoft Utilities\SimpleWMIView_Reports\*.*.*.*_drd-42942_SPORTSNET\bsalgado_2016-06-02_Processes_Report.csv" /Sort "CommandLine"" & ""\PortableApps\WSCCPortable\App\WSCC\NirSoft Utilities"\CSVFileView.exe" /load ""\PortableApps\WSCCPortable\App\WSCC\NirSoft Utilities"\SimpleWMIView_Reports\*.*.*.*_drd-42942_SPORTSNET\bsalgado_2016-06-02_Processes_Report.csv""
Application Title: W|WMI|SimpleWMIView - Displays results of WMI simple queries|Synchronous Mode|Namespace|root\CIMV2|Class|WIN32_Process|Report|Scomma Format File|Sort By|CommandLine
Command Line:
cmd /k echo """%NirSoft_VAR\SimpleWMIView.exe" /ConnectComputer 2 /ComputerName {Enter Computer Name:[Host Name]} /SyncMode 2 /Namespace "root\CIMV2" /Class "WIN32_Process" /scomma "%NirSoft_VAR\SimpleWMIView_Reports\%0_[Host Name]_[WMI - ComputerSystem_User Online]_%date:~10,4%-%date:~4,2%-%date:~7,2%_Processes_Report.csv" /Sort "CommandLine"" & "%NirSoft_VAR\CSVFileView.exe" /load "%NirSoft_VAR\SimpleWMIView_Reports\%0_[Host Name]_[WMI - ComputerSystem_User Online]_%date:~10,4%-%date:~4,2%-%date:~7,2%_Processes_Report.csv""
Echo results:
"""\PortableApps\WSCCPortable\App\WSCC\NirSoft Utilities\SimpleWMIView.exe" /ConnectComputer 2 /ComputerName drd-42942 /SyncMode 2 /Namespace "root\CIMV2" /Class "WIN32_Process" /scomma "\PortableApps\WSCCPortable\App\WSCC\NirSoft Utilities\SimpleWMIView_Reports\*.*.*.*_drd-42942_SPORTSNET\bsalgado_2016-06-02_Processes_Report.csv" /Sort "CommandLine"" & ""\PortableApps\WSCCPortable\App\WSCC\NirSoft Utilities"\CSVFileView.exe" /load ""\PortableApps\WSCCPortable\App\WSCC\NirSoft Utilities"\SimpleWMIView_Reports\*.*.*.*_drd-42942_SPORTSNET\bsalgado_2016-06-02_Processes_Report.csv""
Re: Extra quotes in variables 03 June 2016, 12:09 |
Admin Registered: 18 years ago Posts: 3 519 |