Sign in to follow this  
Followers 0
MFate

Combined Script Doesn't Work

7 posts in this topic

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)

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Do 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.

Share this post


Link to post
Share on other sites

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 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)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0