bobbintb Posted September 14, 2007 Share Posted September 14, 2007 (edited) now this doesnt always happen but a lot of the time. i run a script to install a program and then i have it delete the start menu folder. the folder does get deleted but much of the time (again not always) i get this window.here is my script:ShellExecuteWait("C:\hkSFVsetup.exe", "/S") RegWrite("HKEY_CURRENT_USER\Software\Big-O\hkSFV", "BadFiles", "REG_DWORD", 0) RegWrite("HKEY_CURRENT_USER\Software\Big-O\hkSFV", "UseCache", "REG_DWORD", 0) RegWrite("HKEY_CURRENT_USER\Software\Big-O\hkSFV\WindowPlacement", "Main", "REG_BINARY", "000000000000000000000000000000000000000001000000") DirRemove(@ProgramsDir&"\hkSFV",1) Edited September 14, 2007 by bobbintb Link to comment Share on other sites More sharing options...
Developers Jos Posted September 14, 2007 Developers Share Posted September 14, 2007 How would this be an AutoIt3 BUG ? Do you have Windows Exlorer open on the directory that is deleted by the script ? I am moving this to support ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
weaponx Posted September 14, 2007 Share Posted September 14, 2007 You will definitely see that error if you have a folder opened in an explorer window and some other process deletes it (the folder). Link to comment Share on other sites More sharing options...
bobbintb Posted September 14, 2007 Author Share Posted September 14, 2007 You will definitely see that error if you have a folder opened in an explorer window and some other process deletes it (the folder).ive never had that, it just closes the windows for me. Link to comment Share on other sites More sharing options...
bobbintb Posted September 14, 2007 Author Share Posted September 14, 2007 (edited) How would this be an AutoIt3 BUG ?Do you have Windows Exlorer open on the directory that is deleted by the script ?I am moving this to support ...it does show the window open but thats not the problem. in windows if a folder that is being veiwed is deleted it just closes the window. sometimes it deletes the folder and closes the window and other times it gives me the error. look at the script. it does a silent install and immediately deletes the start menu folder because i dont need them cluttering up my start menu. its a problem with autoit because at times it attempts to delete the folder more than once, causing an error in explorer because it cant delete whats already deleted. Edited September 14, 2007 by bobbintb Link to comment Share on other sites More sharing options...
MHz Posted September 14, 2007 Share Posted September 14, 2007 Why you are using ShellExecuteWait() on an executable file rather then RunWait() is beyond my understanding but I will alert you that explorer will error on being requested to open a non existing folder. The installer of hkSFV does attempt to open an explorer window after the installation and when you immediately delete the folder, then a error is produced. Best concept to do is to handle the window first, then delete the folder. This issue goes way back with installers being a troublesome with opening explorer, readmes, browsers etc at end of install so issues do happen unfortunately due to their existence of being an event. Lets open file\folder donotexist ShellExecute('c:\donotexist') The above ShellExecute is how the installer opens the shortcut folder so produces the error when does not exist as well. Link to comment Share on other sites More sharing options...
bobbintb Posted September 17, 2007 Author Share Posted September 17, 2007 Why you are using ShellExecuteWait() on an executable file rather then RunWait() is beyond my understanding but I will alert you that explorer will error on being requested to open a non existing folder. The installer of hkSFV does attempt to open an explorer window after the installation and when you immediately delete the folder, then a error is produced. Best concept to do is to handle the window first, then delete the folder. This issue goes way back with installers being a troublesome with opening explorer, readmes, browsers etc at end of install so issues do happen unfortunately due to their existence of being an event. Lets open file\folder donotexist ShellExecute('c:\donotexist') The above ShellExecute is how the installer opens the shortcut folder so produces the error when does not exist as well. ah that makes sense. thanks. i just assumed it was double executing the command. i guess sometimes it deletes the folders too quickly. ill just have to put in a delay and wait for the window to come up. and ive had issues before using runwait with a switch so its just easier with the shell. i dont think theres really much of a difference in terms of usage anyway. just how it does it. correct me if im wrong. 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