Vbscript, Windows 7 and C:\ProgramData\Microsoft\Windows\Start menu\Programs
In the process of migrating scripts from our Altiris servers to the Kace K1000 server and I am running into an issue. I am unable to successfully run the below script on a Windows 7 client via Kace. I am sure it is a setting I am missing, but it is in the C:\ProgramData\Microsoft\Windows\Start menu\Programs folder which is non writeable to non-admins.
I have set the Run As command as Local user as well as my user who does have local admin rights on the client machine. The vbscript (Intervals - Shortcut.vbs) was uploaded as a dependency and the On Success job steps are below. No other steps created for script.
The script is failing on the CreateFolder line in the vbscript due to permissions.
Parameters: (KACE_DEPENDENCY_DIR)\Intervals - Shortcut.vbs
' Create Directory
set f=fs.CreateFolder("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Intervals")
' Create Shortcut
Dim oShell : Set oShell = WScript.Createobject("WScript.Shell")
Dim oNetwork : Set oNetwork = CreateObject("WScript.Network")
Dim sAllUsersProfile : sAllUsersProfile = oShell.ExpandEnvironmentStrings("%AllUsersProfile%")
Set oShellLink = oShell.CreateShortcut(sAllUsersProfile & "\Microsoft\Windows\Start menu\Programs\Intervals\Intervals - Timesheet.url")
oShellLink.TargetPath = https://REMOVED_TO_PROTECT_THE_INNOCENT