Sign in to follow this  
Followers 0

Nonstandard Windows Shortcuts

2 posts in this topic

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,


Share this post

Link to post
Share on other sites

I would use:

$powerpointpgm = RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\powerpnt.exe", "")

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
Live for the present,
Dream of the future,
Learn from the past.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0