Link to home
Start Free TrialLog in
Avatar of AndyinJapan
AndyinJapanFlag for United States of America

asked on

When i run the script by user its fine but not by computer?

When i run the script by user its fine but not by computer?
Can someone see any errrrs?
Many thanks
Andy



Set objNet = WScript.CreateObject("WScript.Network")
Set WshShell = CreateObject("WScript.Shell")
DesktopPath = WshShell.SpecialFolders("Desktop")

'map network drive
objNet.MapNetworkDrive "T:", "\\Bst-main\Student\_Reception\Yr R 2007 - 2008", "True"

'create a icon on the desktop
Set link = WshShell.CreateShortcut(DesktopPath & "\Yr R 2007 - 2008.lnk")
link.Description = "User Share Drive"
link.HotKey = "CTRL+ALT+SHIFT+T"
link.IconLocation = "explorer.exe,0"
link.TargetPath = "T:"
link.WindowStyle = 3
link.Save
Avatar of cottsak
cottsak
Flag of Australia image

whats the error?
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AndyinJapan

ASKER

Thanks...
All I have to do now is find a work around..
:)