In LanDesk 8.8, I had a simple batch file that had the following contents
I added the vbs file as an additional file. I ran the batch file package in the local system context, and it gave me the following error:
The remote execute command failed, the application is not a valid Win32 application
However, if i create the package as a windows script host package (Which does not give me the option to run as the logged on user), the package runs just fine. The problem is, the vbs file creates a shortcut that I want to place on the user's desktop, but instead, it puts in on the desktop of the localservice account
Why are we not given the option to run as the logged on user when usign Windows Script host packages....
The vbs file is as below:
set objShell = Wscript.Createobject("Wscript.Shell")
strDesktopFld = objShell.SpecialFolders("Desktop")
Set objURLShortcut = objShell.createShortcut(strDesktopFld & "\Click Here to Add Printer.lnk")
'Name for Shortcut to add
objURLShortcut.Targetpath = "\\sharename\"
'Path to icon
objURLShortcut.IconLocation = "Shell32.dll,95"
'Path for Shortcut