Dim objShell : Set objShell = CreateObject("WScript.Shell")
Dim objFSO: Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim strDesktopPath, ShrtServerFolders, ShrtACT
strDesktopPath = objShell.SpecialFolders("Desktop")
If Not objFSO.FileExists (strDesktopPath & "\Server Folders.lnk") then 'check if server folder shortcut exists
Set ShrtServerFolders = objShell.CreateShortcut(strDesktopPath & "\Server Folders.lnk") ' create server folders link
ShrtServerFolders.TargetPath = "\\domain.local\share"
ShrtServerFolders.IconLocation = "c:\windows\system32\shell32.dll,85"
ShrtServerFolders.Save
End If
If objFSO.FileExists (strDesktopPath & "\ACT! by Sage Premium.lnk") then 'delete act program files shortcut if it exists
msgbox "its there"
objFSO.DeleteFile strDesktopPath & "\ACT! by Sage Premium.lnk" ' delete the link
else
msgbox "ACT! by Sage Premium.lnk doesnt exist!"
End If
If Not objFSO.FileExists (strDesktopPath & "\ACT!.lnk") then 'check if ACT pad shortcut exists
msgbox "ACT! link doesnt exist creating now!"
Set ShrtACT = objShell.CreateShortcut(strDesktopPath & "ACT!.lnk") ' create act pad link
ShrtACT.TargetPath = "\\domain.local\share\ACT\CH.PAD"
ShrtACT.IconLocation = "\\domain.local\NETLOGON\act.ico,0"
ShrtACT.Save
else
msgbox "ACT! Link exists"
End If
|