We have a db application that has two databases.
One is "test" one is live. It has two different icons. The users train in test and then after traning, they go "live"
I have a shortcut that is on "all users" desktop. It runs at user login and they are local admins, because the app needs those rights for the user to be able to run the program.
I need to alter the script below so that it will run even if the user is an not an admin, and check for the strDesktop .lnk file, delete it and replace it with another.
I just dont understand how to specify that user specific desktop location for deletion.
My old script runs fine if the user is an admin, they cant get to the all users desktop, even as a login script.
The script as it is now will delete the current all users desktop icon and create the new shortcut based on the logged in user and place that on their desktop.
How can i alter it so it will then delete that icon an replace it with another when they need to get the "live" icon?
'this will copy the vantage icon to a users desktop
'that is not an admin or have admin rights
'also will remove all users icon link and replace will user specific link
dim FSO, WshShell, strDesktop, sSourceFile
Set WshShell = WScript.CreateObject("WScript.Shell")
Set FSO =CreateObject("scripting.FileSystemObject")
strDesktop = WshShell.SpecialFolders("Desktop")
sSourceFile="c:documents and settingsall usersdesktopTest.lnk"
If FSO.FileExists(sSourceFile) Then
FSO.CopyFile "\tritonInstallVantage Icons.lnk", strDesktop & ""
need to have delete syntax that will check for the strDesktop .lnk file and delete it with the live one
set FSO = Nothing
set WshShell = Nothing