Do not post any licensing information in this forum.
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.
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 1 guest