romulous Posted March 22, 2007 Share Posted March 22, 2007 Hi, I have a AutoIt script that acts as a program launcher for Winamp. The script runs Winamp and once Winamp is closed, the script then deletes certain registry keys afterwards. I'm having a problem with the script, and can't work out how to test what is going wrong. Basically, the script deletes three registry keys, the first two are deleted fine, it's just that it takes about 30 seconds for AutoIt to delete the last key. My thinking is that somehow Winamp as it closes locks this registry key, and AutoIt can't delete the key until Winamp has totally closed. You can see by the system tray icon that the AutoIt script is still running, and about 30 seconds after Winamp has closed, you can see the icon disappear, meaning AutoIt has finally managed to delete the key. Has anyone had any similar problems like this before, or can anyone tell me how to test what problem AutoIt has with that registry key? Thanks, CM Link to comment Share on other sites More sharing options...
GEOSoft Posted March 22, 2007 Share Posted March 22, 2007 Hi, I have a AutoIt script that acts as a program launcher for Winamp. The script runs Winamp and once Winamp is closed, the script then deletes certain registry keys afterwards. I'm having a problem with the script, and can't work out how to test what is going wrong. Basically, the script deletes three registry keys, the first two are deleted fine, it's just that it takes about 30 seconds for AutoIt to delete the last key. My thinking is that somehow Winamp as it closes locks this registry key, and AutoIt can't delete the key until Winamp has totally closed. You can see by the system tray icon that the AutoIt script is still running, and about 30 seconds after Winamp has closed, you can see the icon disappear, meaning AutoIt has finally managed to delete the key. Has anyone had any similar problems like this before, or can anyone tell me how to test what problem AutoIt has with that registry key? Thanks, CMIt's probable that WinAmp is writing to that key so AutoIt will be unable to delete it until WinAmp closes. Try If ProcessExists("WinAmp.exe") Then ProcessWaitClose("WinAmp.exe") Make sure that the name of the exe file is actually Winamp.exe. If not then change the 2 references to the proper file name. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
jvanegmond Posted March 22, 2007 Share Posted March 22, 2007 If you want to know why you can't delete that key: RegMon github.com/jvanegmond Link to comment Share on other sites More sharing options...
romulous Posted March 22, 2007 Author Share Posted March 22, 2007 Hi guys, Thanks for the replies. I'll try both those out and see how I go. It's sort of ironic - I actually have regmon loaded on my USB drive (which is where the AutoIt script is running Winamp from). I didn't even think to load it up to see what was going on with that registry key! :"> CM 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