Champak Posted December 9, 2008 Share Posted December 9, 2008 "HKEY_Local_Machine->Software->Microsoft->Windows->CurrentVersion->Uninstall" Is that registry folder filled with things that have previously been uninstalled, or are they things that have been installed that have the ability to be uninstalled by add/remove? I ask because I want to use it as a way to get the path to an app I want to launch if it exists. Link to comment Share on other sites More sharing options...
walle Posted December 9, 2008 Share Posted December 9, 2008 (edited) "HKEY_Local_Machine->Software->Microsoft->Windows->CurrentVersion->Uninstall" Is that registry folder filled with things that have previously been uninstalled, or are they things that have been installed that have the ability to be uninstalled by add/remove? I ask because I want to use it as a way to get the path to an app I want to launch if it exists. Correct Edit: Installed software. List of installed software 'The script writes all installed software on the computer. Wscript.Echo "Software installed on this machine :" Wscript.Echo "************************************" Set S = CreateObject("RegEdit.Server") For Each Key In S.Keys("SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall").SubKeys If Key.ExistsValue("DisplayName") Then Wscript.Echo Key.Values("DisplayName").Value Else Wscript.Echo "(" & Key.Name & ")" End If Next Edited December 9, 2008 by walle Link to comment Share on other sites More sharing options...
GEOSoft Posted December 9, 2008 Share Posted December 9, 2008 That key holds the paths for the uninstall of installed software so it can usually be parsed to get the path to the app. Be aware that not all installers do a good cleanup job on this key. Another good place is HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths. Just enumerate the hive and if that fails then check the uninstall key. 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...
Champak Posted December 9, 2008 Author Share Posted December 9, 2008 Thanks. I originally checked App Paths, but this particular app is not there. But I will probably do a check there first...for other things...and on fail look in the Uninstall path. My problem now is "ShellExecute($Var0 & "\App.exe")" works but "RunWait("App.exe", Var0)" and "RunWait("App.exe", Var0 & "\")" wont work. Any reason why? I need to use runwait...or run. Link to comment Share on other sites More sharing options...
GEOSoft Posted December 10, 2008 Share Posted December 10, 2008 (edited) Thanks. I originally checked App Paths, but this particular app is not there. But I will probably do a check there first...for other things...and on fail look in the Uninstall path.My problem now is "ShellExecute($Var0 & "\App.exe")" works but "RunWait("App.exe", Var0)" and "RunWait("App.exe", Var0 & "\")" wont work. Any reason why? I need to use runwait...or run.Because in the Run lines you are passing Var0 as the working dir, Try $Var0 assuming that $Var0 is the folder path.Besides what's wrong with ShellExecute() and ShellExecuteWait()?Edit: Also you forgot to put the path before the filename in those Run() linesRun($Var0 & "\App.exe", $Var) Edited December 10, 2008 by GEOSoft 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...
Champak Posted December 10, 2008 Author Share Posted December 10, 2008 I just forgot to put the "$" in the post. Then the helpfile should be corrected/expanded...IMO...because the way it reads is you have to put the (FileName.exe, Path), not (Path\FileName.exe, [Option] Path). Why is there even an option of putting the path as the second parameter if you have to put it in the first parameter to get the program to open in the first place? The second parameter seems useless. I wanted to use runwait instead of shellexecutewait because I was under the impression that runwait would have waited only until the program actually started (didn't read the instructions fully), instead of waiting until it started and then closed like I thought only shellexecutewait did. I guess I'll just use run and processwait. Thanks. Link to comment Share on other sites More sharing options...
GEOSoft Posted December 10, 2008 Share Posted December 10, 2008 I just forgot to put the "$" in the post. Then the helpfile should be corrected/expanded...IMO...because the way it reads is you have to put the (FileName.exe, Path), not (Path\FileName.exe, [Option] Path). Why is there even an option of putting the path as the second parameter if you have to put it in the first parameter to get the program to open in the first place? The second parameter seems useless. I wanted to use runwait instead of shellexecutewait because I was under the impression that runwait would have waited only until the program actually started (didn't read the instructions fully), instead of waiting until it started and then closed like I thought only shellexecutewait did. I guess I'll just use run and processwait. Thanks.The second prameter is the working folder, which can be different from the path. In most cases you don't even need it but it never hurts to have it in there. 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...
Champak Posted December 10, 2008 Author Share Posted December 10, 2008 I don't understand that. What is the "working folder" if it isn't the folder/path of where the file is? Link to comment Share on other sites More sharing options...
GEOSoft Posted December 10, 2008 Share Posted December 10, 2008 I don't understand that. What is the "working folder" if it isn't the folder/path of where the file is?http://www.webopedia.com/TERM/W/working_directory.html http://en.wikipedia.org/wiki/Working_directory To find out what your cuurent working directory is just run the following. MsgBox(4096, "", "Your current working directory is:" & @CRLF & @WorkingDir) 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...
Champak Posted December 10, 2008 Author Share Posted December 10, 2008 Oooo. I knew that . It just wasn't clicking. I'm not thinking external app and my app in the same directory. Thanks. 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