tmakruck Posted May 11, 2006 Share Posted May 11, 2006 I've got a script that will be running on different machine types, which may have different versions of software, like MSOffice 2003 vs Office 2000. I want to be able to check that the shortcut icon is built correctly, then use the target path to launch the executable. On what I call "normal" applications, like notepad, this is easy because the target path is just "C:\winnt\notepad.exe" or whatever. Unfortunately, some apps have what microsoft calls "Advertised Shortcuts". These don't have an active Target field when you right click - Properties on one of these. and If you run an autoit FileGetShortcut on an Advertised Shortcut, like those for MS Office applications, it returns something like "C:\winnt\installer\{90010409-0600-11D3-8CFE-0150048383C9}\pptico.exe" (for powerpoint). Now I know that the executable for Powerpoint is in the Program Files\[office installation folder]\powerpnt.exe. Since the version of powerpoint may be different, it might reside in, say, Program files\Office10 , or maybe Program Files\Office11. How can I resolve that ugly C:\winnt\installer\{90010409-0600-11D3-8CFE-0150048383C9}\pptico.exe thing into the path to powerpnt.exe? Or, how does windows do it, so I can try to recreate it on my own, in autoit language? I've looked on msdn, and cant seem to search for the right thing to get my answer thanks in advance, Todd Link to comment Share on other sites More sharing options...
Developers Jos Posted May 11, 2006 Developers Share Posted May 11, 2006 I would use: $powerpointpgm = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\powerpnt.exe", "") 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...
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