tobi Posted March 27, 2006 Share Posted March 27, 2006 Hi... i want to make auto-installation. after the installation is complete i want to remove the installation file from the local harddisk but the file is left there every time. maybe the installtion process will not be unloaded so fast and the file is in still in use when the script tries to delete it. Winwaitdelay seems not to work... Can you give me some ideas...? thx in advance Tobi RunAsSet("***", "%Computername%","***") FileCopy("K:\***\owc11.exe", "d:\") Run ("D:\owc11.exe") WinWaitActive ("Microsoft Office 2003 Web Components Setup", "To continue with Office") Send ("!a") Send ("!i") WinWaitActive ("Microsoft Office 2003 Web Components Setup", "Microsoft Office 2003 Web Components Setup has completed successfully.") Send ("{ENTER}") AutoItSetOption ("WinWaitDelay",5000) FileDelete("D:\owc11.exe") RunAsSet( ) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 27, 2006 Moderators Share Posted March 27, 2006 If this is your own (AutoIt written) Setup File... you could look at _SelfDelete() (in SciTe type in _SelfDelete and then spacebar), and OnAutoItExit(). 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...
tobi Posted March 28, 2006 Author Share Posted March 28, 2006 Hi smoke... i cannot find something about _selfdelete.. could you give me a little bit more information about it please ?! do you have an idea why the command FileDelete("D:\owc11.exe") doesnt work in my script ? br Tobi Link to comment Share on other sites More sharing options...
MHz Posted March 28, 2006 Share Posted March 28, 2006 Just try to monitor the PID and delete it when it is closed.RunAsSet("***", "%Computername%","***") FileCopy("K:\***\owc11.exe", "d:\") $pid = Run ("D:\owc11.exe") WinWaitActive ("Microsoft Office 2003 Web Components Setup", "To continue with Office") Send ("!a") Send ("!i") WinWaitActive ("Microsoft Office 2003 Web Components Setup", "Microsoft Office 2003 Web Components Setup has completed successfully.") Send ("{ENTER}") AutoItSetOption ("WinWaitDelay",5000) ProcessWaitClose($pid) FileDelete("D:\owc11.exe") RunAsSet( )Note: selfdelete is the Scite4AutoIt3 abbreviation Link to comment Share on other sites More sharing options...
tobi Posted March 28, 2006 Author Share Posted March 28, 2006 hey..thx..it works 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