MFate Posted August 21, 2007 Share Posted August 21, 2007 I have a script that installs some software and then does some cleanup afterwards. The software installation part works fine but the cleanup part doesn't work. When I separate the scripts into individual files and run them individually, everything works fine. The combined script is shown here. Any help would be greatly appreciated. ; Install ScriptPro RunWait ("P:\zInstall\Support\ScriptPro\CDROM1\Setup.exe /qn") WinWaitActive ("ScriptPro", "Please wait while Windows configures ScriptPro") WinWaitClose ("ScriptPro", "Please wait while Windows configures ScriptPro") ; Do some cleanup DirRemove ("C:\Documents and Settings\All Users\Start Menu\Programs\Autodesk\ScriptPro", 1) FileCopy ("P:\zInstall\Support\ScriptPro\ScriptPro.lnk", "C:\Documents and Settings\All Users\Start Menu\Programs\Autodesk\ScriptPro.lnk", 9) Link to comment Share on other sites More sharing options...
Mast3rpyr0 Posted August 21, 2007 Share Posted August 21, 2007 try adding like a 2-3 second sleep in between, if the rest of the script runs as soon as the window closes then the files might still act as if they were still being run by the program and they cant be deleted. My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
MFate Posted August 21, 2007 Author Share Posted August 21, 2007 try adding like a 2-3 second sleep in between, if the rest of the script runs as soon as the window closes then the files might still act as if they were still being run by the program and they cant be deleted.I tried your suggestion and even extended the time to 1 full minute, however it did not work.Sleep (60000) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 21, 2007 Moderators Share Posted August 21, 2007 What exactly isn't working? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
MFate Posted August 21, 2007 Author Share Posted August 21, 2007 What exactly isn't working?The DirRemove and the FileCopy portion of the script do not work inside of the main script which is shown at the top of this thread Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 21, 2007 Moderators Share Posted August 21, 2007 The DirRemove and the FileCopy portion of the script do not work inside of the main script which is shown at the top of this threadDo you have permissions to do it? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
MFate Posted August 21, 2007 Author Share Posted August 21, 2007 Do you have permissions to do it?Yes I have permissions.I have a script that installs some software and then does some cleanup afterwards. The software installation part works fine but the cleanup part doesn't work. When I separate the scripts into individual files and run them individually, everything works fine. The combined script is shown here.; Install ScriptPro RunWait ("P:\zInstall\Support\ScriptPro\CDROM1\Setup.exe /qn")WinWaitActive ("ScriptPro", "Please wait while Windows configures ScriptPro")WinWaitClose ("ScriptPro", "Please wait while Windows configures ScriptPro"); Do some cleanupDirRemove ("C:\Documents and Settings\All Users\Start Menu\Programs\Autodesk\ScriptPro", 1)FileCopy ("P:\zInstall\Support\ScriptPro\ScriptPro.lnk", "C:\Documents and Settings\All Users\Start Menu\Programs\Autodesk\ScriptPro.lnk", 9) 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