vbscript - Problem with 2 command in 1 vbs -


I have a small problem with simple vbScript. After the script 2 actions have to run one.

  Options clear dim WshShell dim tomorrow dim results dim commande dim Jour Set WshShell = WScript.CreateObject ( "WScript.Shell") tomorrow = DATEADD ( "D", 2, Date ()) Result = "00001" result = result & amp; Correct (year (tomorrow), 2) travel = (date format ("y", tomorrow)) if ((100 travel); (travel; 9)) result = result & amp; "0" & ​​amp; If traveling (travel and 10; 10) then result = result & amp; "00" & amp; If traveling (travel and =; 100) then result = result & amp; Jour result = "" "(& amp; (objectClass = eTGlobalUser) (eTSuspended = 0) (eTRoleDN = *) (eTUpdateDate & gt; =" & amp; Results & amp; "))" "" commande = GetScriptPath ( ) & Amp; "PharosGDH.exe / ldapfilter:" & amp; Results & amp; "/ Console" WshShell. Run command, 5, true command 2 = GetScriptPath () & amp; "PharosGDH.exe / all / auditPharos WshShell.Run commande2, 5, really WScript.Quit 1 function GetScriptPath () GetScriptPath = Left (WScript.ScriptFullName, InStrRev (WScript.ScriptFullName," \ ")) End Function  < / Pre> 

Can anyone tell me what's wrong?

Sorry, copy / did not announce at last, and after closing the windows quietly, after that I feel That's not the result!

Is this your actual code? It contains at least two syntax Errors are:

First Syntax error:

  commande2 = GetScriptPath () & amp; "PharosGDH.exe / all / auditPharos  
is missing at the end of the line:

  command2 = GetScriptPath () & amp; "PharosGDH.exe / all / auditPharos"  

Second Syntax error:

  lackluster results dim commande dim Jour  

Variable "commande2" is used, but not declared. Use:

Low command less slow command 2 diy travel

If it does not fix your problem, as others have said, Please tell us, what's the problem: error message? Wrong behavior

second attempt

It may be possible to execute the displayed commands to check that they contain the right content before being used to enable:

  commande = GetScriptPath () & amp; "PharosGDH.exe / ldapfilter:" & amp; Results & amp; "Console" WshShell.Popup Commander WshShell. Run Command 1, 5, True Command2 = GetScriptPath () & amp; "PharosGDH.exe / all / auditPharos" WshShell.Popup commander WshShell.Run command 2, 5, right WScript.Quit 1  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -