Rename Mapped Drive

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.
User avatar
Posts: 36
Joined: Thu Aug 31, 2006 4:34 am

Re: Rename Mapped Drive

Post by devereux0110 » Tue Jul 14, 2015 10:13 am

jvierra wrote:I thought the issue only happened when the user was not connected to the network.

Why are you renaming a drive that is not connected?

I am afraid that this is a hardware issue and not a scripting issue. It may also be a result of trying to use the shell to rename a disconnected drive. The shell is not intended to be used this way.

You can use the net mapping commands to label a mapped device. It will usually be more reliable.

I am not trying to rename a drive that is not connected, at the time of running the script, the user is connected to the network and online.

Each user has an icon on their Desktop, "sort My Desktop", this runs a script which maps 5 network drives and renames them. The same script then renames the now connected W: Drive which the user as been using off line but has now connected back to the network.

The same script is also set to run as a logon script. If the user as to use the desktop icons because they logged onto the computer offsite, the script maps the 5 network drives and renames them and then trys to rename the W: Drive but it does rename.

When the same script is run as a logon script where the user is connected to the network at the time of logon, the a script maps the 5 drives and renames them and also then renames the w:\

At no point am I trying to rename a drive which is offline, it cant be an hardware issue as it wouldn't work as a logon script if it was an hardware issue.

User avatar
Posts: 11051
Joined: Tue May 22, 2007 9:57 am

Re: Rename Mapped Drive

Post by jvierra » Tue Jul 14, 2015 10:53 am

You said it yourself. The other drives all work correctly. Only this one is an issue. Yu are trying to re-connect to a network drive. All others work except one. Why is that a scripting issue. It has to be either configuration or an issue with how GPO is set up. I suspect it may be set to run synchronously. That can change the behavior completely.

Since we cannot see you systems or run any tests there doesn't seem to be any way to help you.

Remember that the shell is not really designed to be used with scripts. It can have very odd behaviors when run in a script. You should consider looking into other tools to set up the drives.

You could also try using PowerShell to see if that helps at all.

Other than those suggestions I cannot see how we can help.


Who is online

Users browsing this forum: No registered users and 3 guests