Hi All,
What I'd like to is modify the following script to do the following:
Check for a particual folder off the Start->All Programs.
If the folder exists create a shortcut inside of it. This folder may not have the shortcut I want so I want it to overwrite one that may be there. The name of the shortcut if it is present will be the same one I am trying to create. Nothing different. If the folder does not exist create the folder and then create the shortcut within the folder. Here is what I have so far
Option Explicit
Dim objShell, objShortcut, strFolder
Set objShell = WScript.CreateObject("WScript.Shell")
strFolder = objShell.SpecialFolders("AllUsersStartMenu")
Set objShortcut = objShell.CreateShortcut(strFolder & "\Software Portal.lnk")
objShortcut.TargetPath = "C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagementSolution\SWRAgentUtils.exe /ShowSoftwarePortal"
objShortcut.WorkingDirectory = "C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagementSolution"
objShortcut.WindowStyle = 1
objShortcut.Save
Set objShortcut = Nothing
Set objShell = Nothing
What I'd like to is modify the following script to do the following:
Check for a particual folder off the Start->All Programs.
If the folder exists create a shortcut inside of it. This folder may not have the shortcut I want so I want it to overwrite one that may be there. The name of the shortcut if it is present will be the same one I am trying to create. Nothing different. If the folder does not exist create the folder and then create the shortcut within the folder. Here is what I have so far
Option Explicit
Dim objShell, objShortcut, strFolder
Set objShell = WScript.CreateObject("WScript.Shell")
strFolder = objShell.SpecialFolders("AllUsersStartMenu")
Set objShortcut = objShell.CreateShortcut(strFolder & "\Software Portal.lnk")
objShortcut.TargetPath = "C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagementSolution\SWRAgentUtils.exe /ShowSoftwarePortal"
objShortcut.WorkingDirectory = "C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagementSolution"
objShortcut.WindowStyle = 1
objShortcut.Save
Set objShortcut = Nothing
Set objShell = Nothing