daniel_lsl Posted November 9, 2006 Share Posted November 9, 2006 Hi All, I've facing a problem with this script and would appreciate any help or advice here. Please see attached the error message when I run the script. I've attached a part of my script to this message: expandcollapse popup#include <file.au3> #include <date.au3> Opt("TrayIconDebug", 0) dim $file, $ErrVal, $file1, $WinEx, $Count ; Set the RunAs parameters to use local adminstrator account RunAsSet("administrator", @Computername, "admin01") If FileExists("C:\WINNT\Temp\UnAlt-ok.log") = 1 Then $ErrVal = FileCopy("C:\WINNT\Temp\UnAlt-ok.log", @AppDataCommonDir) If $ErrVal = 0 Then Errorlog("Cannot Copy UnAlt-ok.log") EndIf EndIf If FileExists("C:\WINNT\Temp\AlCollection.ini") = 1 Then $ErrVal = FileCopy("C:\WINNT\Temp\AlCollection.ini", @AppDataCommonDir) If $ErrVal = 0 Then Errorlog("Cannot Copy AlCollection.ini") EndIf EndIf If FileExists(@AppDataCommonDir & "\UnAlt-ok.log") = 0 Or FileExists("C:\Program Files\Altiris\Altiris Agent\Client Policies\xxxx.xml") = 1 Then ; Run Altiris Cleanup If FileExists("C:\Program Files\Altiris\Altiris Agent\AeXAgentUtil.exe") = 1 Then $ErrVal = RunWait(chr(34)&"C:\Program Files\Altiris\Altiris Agent\AeXAgentUtil.exe"&chr(34)& " /clean") If $ErrVal <> 0 Then Errorlog("Error running AexAgentUtil.exe") MsgBox(0,"Warning", "Uninstallation Failed ! Please check with IT Helpdesk") Exit EndIf Else ;No existing Altiris Client, install new client InstallNew() EndIf Thanks in advance. Link to comment Share on other sites More sharing options...
GaryFrost Posted November 9, 2006 Share Posted November 9, 2006 try: $ErrVal = RunWait('"C:\Program Files\Altiris\Altiris Agent\AeXAgentUtil.exe" /clean') SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
daniel_lsl Posted November 9, 2006 Author Share Posted November 9, 2006 Hi gafrost, Your recommendation works. Thank you. Really appreciate it. Link to comment Share on other sites More sharing options...
Uten Posted November 9, 2006 Share Posted November 9, 2006 Hi, To avoid errors later you should also check out the AutoIt's directory macros. You find them in the help file autoit->Macro Reference->Directory macros-[@windowsDir|@ProgramFilesDir] Just a my two cents. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
daniel_lsl Posted November 14, 2006 Author Share Posted November 14, 2006 Hi qafrost,The recommendation works however I've some PCs is Japan giving this problem. Please see my script below. $ErrVal = RunWait(@AppDataCommonDir & '\AeXNSC.exe -s -a ns="apns2.basf-sea.com.sg" NOSTARTMENU NOTRAYICON /s')Any advice? Thanks. Link to comment Share on other sites More sharing options...
MHz Posted November 14, 2006 Share Posted November 14, 2006 Add double quotes around the path to the file. $ErrVal = RunWait('"' & @AppDataCommonDir & '\AeXNSC.exe" -s -a ns="apns2.basf-sea.com.sg" NOSTARTMENU NOTRAYICON /s') Looks like a Japanese OS does no use backslashes but an alternative character. Hopefully the code may still work fine. 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