hirsty2000 Posted February 4, 2005 Share Posted February 4, 2005 I have written the script below to enable me to install some software however I am having trouble with the final section - which I have highlighted red.If I type this into a command prompt it will run fine, but through the script it will not run.Any suggestions?ThanksWinMinimizeAll ()Dim $1$PID = ProcessExists("outlook.exe") ; Will return the PID or 0 if the process isn't found.SplashTextOn("Penna Install Service", @CRLF & "THIS MACHINE IS BEING UPDATED WITH NEW SOFTWARE." & @CRLF & @CRLF & "Do not use this machine until all windows have closed successfully!" & @CRLF & @CRLF & "Please report any errors to the IT Representative in accordance with" & @CRLF & "the schedule in the installation instructions.", 700, 130, -1, 10, 16, "Arial", 8, 600)If $PID Then ProcessClose($PID) Sleep(1000)RunAsSet ("Username", "Domain", "Password")Sleep(1000)RunWait(@ScriptDir & "\software\p_client.exe")Sleep(1000)RunWait(@ScriptDir & "\software\printer.exe")Sleep(1000)RunWait(@ScriptDir & "\software\outlook.exe")Sleep(1000)RunWait(@ScriptDir & "\software\xcacls.exe c:\docume~1\alluse~1\applic~1\interw~1 /t /e /g Everyone:c /y")RunWait(@ScriptDir & "\software\xcacls.exe c:\docume~1\alluse~1\applic~1\interw~1\*.* /t /e /g Everyone:c /y")Sleep(1000)SplashOff()RunAsSet () Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 4, 2005 Share Posted February 4, 2005 (edited) RunWait(@ScriptDir & "\software\xcacls.exe c:\docume~1\alluse~1\applic~1\interw~1 /t /e /g Everyone:c /y")RunWait(@ScriptDir & "\software\xcacls.exe c:\docume~1\alluse~1\applic~1\interw~1\*.* /t /e /g Everyone:c /y")<{POST_SNAPBACK}>Taking the commands you have in red and the hint that the CMD prompt works fine:RunWait(@ComSpec & ' /c ' & @ScriptDir & '"\software\xcacls.exe c:\docume~1\alluse~1\applic~1\interw~1 /t /e /g Everyone:c /y"',"",@SW_HIDE) WinWaitExsist($xcacls) WinWaitClose($xcacls) RunWait(@ComSpec & ' /c ' & @ScriptDir & '"\software\xcacls.exe c:\docume~1\alluse~1\applic~1\interw~1\*.* /t /e /g Everyone:c /y"',"",@SW_HIDE) WinWaitExsist($xcacls) WinWaitClose($xcalcs)Try that and see if it works.Keep in mind that the RunWait is only for the dosbox at this point so the extra WinWaitClose() may be required.Edit: Corrected RunWait syntax. Forgot the null for the working directory Edited February 4, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now