>First, allow me to wipe the egg off of my face.. here's the sample code
>
>WshShell = CreateObject("WScript.Shell")
>strDesktop = WshShell.SpecialFolders("Desktop")
>oShellLink = WshShell.CreateShortcut(strDesktop + "\Acrobat Reader 5.1.lnk")
>myCmd=oShellLink.TargetPath
>myCmd='"'+myCmd+'"'
>? "= "+ myCmd
>WshShell.run(myCmd)
>
>Apparently, I didnt realize that SpecialFolders("Desktop") was returning the currently logged on user's Desktop ala Documents and Setting\Len\Desktop and my created shortcut to a folder actually existed there.. the installed shortcuts however, exist in Documents and Settings\All Users\Desktop and that explains why my tests failed.. The real question appears to be.. how do I get a reference to All Users Desktop (is there a parameter like Desktop that I can use or do I have to use brute force)?
>
>-- Len
Found it.. AllUsersDesktop works.. which is kind of tricky.. is there no way to access the shortcut generically without prior knowledge of it being installed in user\desktop of all user\desktop ??
-- Len
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement