As part of our test roll out Office 2003 & 2007 were installed on the same computers of users. That being said Office 2007 was installed in a separate folder (c:\program file\microsoft office 2007). Post roll out new installs went back to the default folder (c:\program file\microsoft office 2007).
That being said I need to create desktop shortcuts for Outlook. I need to assume it could have been installed in one of two places. How can I tweak the below code to check for Outlook and create the shortcut as appropriate.
dim shell, desktopPath, link
Set shell = WScript.CreateObject("WScript.shell")
desktopPath = shell.SpecialFolders("AllUsersDesktop")
Set link = shell.CreateShortcut(desktopPath & "\Microsoft Outlook 2007.lnk")
link.Description = "Microsoft Outlook 2007"
link.TargetPath = "C:\Program Files\Microsoft Office\Office12\Outlook.exe"
link.WindowStyle = 3
link.WorkingDirectory = desktopPath
link.Save
set shell = nothing
Thanks.
That being said I need to create desktop shortcuts for Outlook. I need to assume it could have been installed in one of two places. How can I tweak the below code to check for Outlook and create the shortcut as appropriate.
dim shell, desktopPath, link
Set shell = WScript.CreateObject("WScript.shell")
desktopPath = shell.SpecialFolders("AllUsersDesktop")
Set link = shell.CreateShortcut(desktopPath & "\Microsoft Outlook 2007.lnk")
link.Description = "Microsoft Outlook 2007"
link.TargetPath = "C:\Program Files\Microsoft Office\Office12\Outlook.exe"
link.WindowStyle = 3
link.WorkingDirectory = desktopPath
link.Save
set shell = nothing
Thanks.