Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 6

how to handle & symbol in LaunchAppAndWait

hi folks,

I am executing a command using LaunchAppAndWait, in command line I am using password which is entred by the user. if the password contains "&" symbol e.g. Abcde&1234 command execution is failing, im getting the output as " operation Failed with user provided password
'1234' is not recognized as an internal or external command,"

my code is as follows, how to handle & symbol.

'I get the value of szLBPwd during installation
'szAppPath is executable binary path

szCmd = "";
szCmd = " -abcd -password " + szLBPwd + " abc -xyz > output.log 2>&1";

nRes = LaunchAppAndWait(svCmdPath ^ "cmd","/C " + szAppPath + szCmd, LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN);
nReturnCode = NULL;
nReturnCode = LAAW_PARAMETERS.nLaunchResult;

best regards
Labels (1)
0 Kudos
(1) Reply
Level 7

0 Kudos