Neil,
Just re-read your post and I dont think my first answer was of much use.
So you are trying to push these shortcuts out on to desktops, is this correct?
Could you not check if the locations exist with a try catch. So check for the Documents and Settings first if that fails then you would have to assume that it isnt 2000 or XP so then check for the 98 location.
Not sure if this is of any use.
Jon
>I am trying to save a LNK file to users desktops using the following code:
>
>
>cFileName = "\\baker\apps\QuestPDMHangers\CheckHanger.bat"
>cLinkName = "CheckHanger002.LNK"
>cDestination = "C:\Documents and Settings\lewisn\Desktop"
>
>oShell = CREATEOBJECT('WScript.Shell')
>olink = oShell.CreateShortcut(cDestination +"\"+ cLinkName)
>oLink.TargetPath = cfilename
>oLink.Arguments = "00001"
>oLink.Save()
>
>
>The problem is cDestination assumes the windows OS path is C:\Documents and Folders. IS there a global way of sending files to the desktop. i.e. \\
\desktop. The reason I ask is that some users may have windows 98 which doesnt have this path for its desktop.
>
>Any suggestions?