?
Solved

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

Posted on 2007-10-11
3
Medium Priority
?
221 Views
Last Modified: 2010-04-20
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
0
Comment
Question by:AndyinJapan
3 Comments
 
LVL 6

Expert Comment

by:cottsak
ID: 20054779
whats the error?
0
 
LVL 85

Accepted Solution

by:
oBdA earned 2000 total points
ID: 20054938
Simply because drive mappings are *user* specific, not machine specific.
You'll have to run this script indeed per user, not per machine.
0
 

Author Comment

by:AndyinJapan
ID: 20056859
Thanks...
All I have to do now is find a work around..
:)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found here: http://www.experts-exchang…
Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question