Issue with passing certain parameters to a third-party application

Started by rmpf2

Hi Andrew, I'm dealing (netscan_portable\64-bit) with the following statement on applications area (Note - Please look at first parameter):

Ex. 1 Statement to run ----> cmd /k echo "\PortableApps\WSCCPortable\App\WSCC\Sysinternals Suite\accesschk.exe" {Specify a user/group name:[Logged User]} {Path to analyse:\\%0\c$\}
Result ----> "\PortableApps\WSCCPortable\App\WSCC\Sysinternals Suite\accesschk.exe" "agency\wwillillo" \\192.168.x.x\c$\

Ex. 2 Statement to run ----> cmd /k echo "\PortableApps\WSCCPortable\App\WSCC\Sysinternals Suite\accesschk.exe" {Specify a user/group name:Domain Admins} {Path to analyse:\\%0\c$\}
Result ----> "\PortableApps\WSCCPortable\App\WSCC\Sysinternals Suite\accesschk.exe" "Domain Admins" \\192.168.x.x\c$\

In the beginning I thought it was because the column header ([Logged User]) but then I found that manually entering the parameter they where there ---> " "
I just want to know is this is a normal behavior of the app because in may case I don't need the " " there. Those " " are giving me an execution error. Thanks again.
SoftPerfect Support forum - Andrew avatar image

Re: Issue with passing certain parameters to a third-party application   14 May 2014, 10:06

Sorry, I don't quite understand the issue. Are you saying that both "agency\wwillillo" and "Domain Admins" should not have the surrounding quotes?

My understanding is agency\wwillillo does not really require quotes around it, but Domain Admins must be quoted as otherwise they will be treated as two separate parameters.

The effect is explained in this article.
Hi Andrew, I'm reading the article, thanks. But in the meantime here is an exact copy of the remote calls with just one difference, the first parameter call for (1):

1) A|Audit|USER|AccessChk - Enter User/Group Parameter - Report user or group access to files and directories

cmd /k "\PortableApps\WSCCPortable\App\WSCC\Sysinternals Suite\accesschk.exe" {Specify a user/group name:[ComputerSystem_User Online]} {Path to analyse:\\%0\c$\}

Result:
'\PortableApps\WSCCPortable\App\WSCC\Sysinternals' is not recognized as an internal or external command, operable program or batch file.

H:\PortableApps\Network_Utils\Port_Utils\netscan_portable\64-bit>


2) A|Audit|USER|AccessChk - Report user or group access to files and directories

cmd /k "\PortableApps\WSCCPortable\App\WSCC\Sysinternals Suite\accesschk.exe" [ComputerSystem_User Online] {Path to analyse:\\%0\c$\}

Result:
Accesschk v5.2 - Reports effective permissions for securable objects
Copyright (C) 2006-2014 Mark Russinovich Sysinternals - www.sysinternals.com

RW \\192.168.x.x\c$\.rnd
RW \\192.168.x.x\c$\2d28c6f9f069c02ac2fa3fc31ca2
RW \\192.168.x.x\c$\ac3ccebb53244b254d753696fb
RW \\192.168.x.x\c$\boot.ini
RW \\192.168.x.x\c$\Config.Msi
RW \\192.168.x.x\c$\Documents and Settings
RW \\192.168.x.x\c$\drd-42149-fd.conf
RW \\192.168.x.x\c$\eula.1028.txt
RW \\192.168.x.x\c$\eula.1031.txt
RW \\192.168.x.x\c$\eula.1033.txt
RW \\192.168.x.x\c$\eula.1036.txt
RW \\192.168.x.x\c$\eula.1040.txt
RW \\192.168.x.x\c$\eula.1041.txt
RW \\192.168.x.x\c$\eula.1042.txt
RW \\192.168.x.x\c$\eula.2052.txt
RW \\192.168.x.x\c$\eula.3082.txt
RW \\192.168.x.x\c$\FirefoxPortable
RW \\192.168.x.x\c$\globdata.ini
.
.
.

H:\PortableApps\Network_Utils\Port_Utils\netscan_portable\64-bit>

As you can see if I don't ask for the user/group information everything work as expected.
SoftPerfect Support forum - Andrew avatar image

Re: Issue with passing certain parameters to a third-party application   15 May 2014, 12:18

That's interesting, I have played a bit with this and found there was a difference when we pass the parameter as user-prompted:
{Specify a user/group name:[ComputerSystem_User Online]}
"\PortableApps\WSCCPortable\App\WSCC\Sysinternals Suite\accesschk.exe" "thinkpad" \\192.168.56.1\c$\

[ComputerSystem_User Online]
"\PortableApps\WSCCPortable\App\WSCC\Sysinternals Suite\accesschk.exe" thinkpad \\192.168.56.1\c$\

The only visible difference is the redundant quotes in the first case. Try the latest build, it does not add any quotes unless necessary and let me know how it works for you.
Andrew, working as expected. By the way do you still agree on designing the New Filters Management Area??? Thanks!!!
SoftPerfect Support forum - Andrew avatar image

Re: Issue with passing certain parameters to a third-party application   16 May 2014, 11:23

Yes, as soon as we get time for it smile
Hi Andrew, same strange behavior in the following case:


1) cmd /k echo %PsExec_VAR \\%0 -u {Enter your username:%USER} -p {Enter your password:} -i {Enter command:rundll32 wbemupgd, UpgradeRepository}

Result:

'\PortableApps\WSCCPortable\App\WSCC\Sysinternals' is not recognized as an inter
nal or external command,
operable program or batch file.

H:\PortableApps\Network_Utils\Port_Utils\netscan_portable\64-bit>



2) cmd /k %PsExec_VAR \\%0 -u {Enter your username:%USER} -p {Enter your password:} -i rundll32 wbemupgd, UpgradeRepository

Result:

PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - www.sysinternals.com


rundll32 exited on 192.168.1.14 with error code 0.

H:\PortableApps\Network_Utils\Port_Utils\netscan_portable\64-bit>
SoftPerfect Support forum - Andrew avatar image

Re: Issue with passing certain parameters to a third-party application   19 May 2014, 12:53

This apparently occurred because when %PsExec_VAR was replaced with the actual path and file name, it was not quoted, where the subsequent parameters came quoted. This misled the Windows command-line interpreter.

Please try the latest build, it should now handle everything correctly.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

       **  **     **   ******   ********   *******  
       **   **   **   **    **     **     **     ** 
       **    ** **    **           **     **        
       **     ***     **           **     ********  
 **    **    ** **    **           **     **     ** 
 **    **   **   **   **    **     **     **     ** 
  ******   **     **   ******      **      *******  

Message: