DazGizmo Posted April 3, 2018 Author Share Posted April 3, 2018 Many Thanks Subz and Earthshine... This code worked!: ;~ Check 64bit key: Local $sFilePath = RegRead("HKLM64\Software\Microsoft\Windows\CurrentVersion\App Paths\tcw25.exe", "") If $sFilePath = "" Then ;~ Check 32bit key : $sFilePath = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\tcw25.exe", "") EndIf If FileExists($sFilePath) = 0 Then Exit ;~ File doesn't exist. Run($sFilePath) Earthshine 1 Link to comment Share on other sites More sharing options...
Earthshine Posted April 3, 2018 Share Posted April 3, 2018 Knew you could do it. You could apply that same technique to look at the uninstall or install location rather DazGizmo 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
DazGizmo Posted April 3, 2018 Author Share Posted April 3, 2018 This is the first use of reading the Registry.... Are you saying that The install Location is better than using the App Paths?? TurboCAD comes in both versions 32bit and 64bit so if a user has both installed I will need to provide a switch maybe... Link to comment Share on other sites More sharing options...
Earthshine Posted April 3, 2018 Share Posted April 3, 2018 (edited) I prefer using the install location because it indicates the windows thinks it’s a valid install and it probably could be repaired if it was damaged by user. But using app paths is fine or should be fine Edited April 3, 2018 by Earthshine DazGizmo 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Subz Posted April 3, 2018 Share Posted April 3, 2018 "App Paths" key is generally better as it includes the full path to the exe, whereas Install Location only points to the directory the software is installed into, however like in Turbo Cad, many applications will place it in a subfolder of the Install Location. "TurboCAD comes in both versions 32bit and 64bit so if a user has both installed I will need to provide a switch maybe.." Another reason to use App Paths, which ever version is the default for handling TurboCad extensions this will be the one found in App Paths, only one version can be in the App Paths i.e. HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths and HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths are identical, when you add or remove a key from App Paths its replicated to the other key. Hope that makes sense. Earthshine and DazGizmo 1 1 Link to comment Share on other sites More sharing options...
Earthshine Posted April 3, 2018 Share Posted April 3, 2018 (edited) either or. as long as the OP is happy. searching for the exe under the given folder is also trivial. I deal with the install locations mostly because I also test the installers and verify those keys and files are what they are supposed to be. it's not like he doesn't know where that stuff is. He should know what he tested. As noted, you can only have one version installed as the handler, 32 or 64 bit, and you should know what you installed and are testing. If you automate the installers like I do, you already KNOW where it's installed and where everything is. Edited April 3, 2018 by Earthshine My resources are limited. You must ask the right questions 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