MapNetworkDrive local/remote
- From: Giovanni <tirloni@xxxxxxxxx>
- Date: Fri, 8 Aug 2008 13:16:33 -0700 (PDT)
Hello,
I've a script that does a few things and then maps a network drive
using the following code:
objWshNetwork.MapNetworkDrive "T:", "\\server\share", False, "user",
"password"
'objWshShell.Run "net use T: \\server\share /U:user password /
PERSISTENT:NO"
'objWshShell.Run "C:\mountShare.bat"
If (Err.Number <> 0) Then
LogAction "Failed to mount network share (Err.Number=" & Err.Number &
")"
Else
LogAction "Mounted network share"
End If
When I run it locally when I'm logged to the machine's desktop it
works just fine but when I fire the script through
Win32_Process.Create over WMI the script simply dies right when it was
supposed to mount the drive.
The other two lines that are commented out are my attempts to try to
mount it in a different way ("net use" direcly and thru a batch file).
All of them work when I'm local, but fail remotely.
Is there anything that I'm missing ?
There rest of the script works just fine if I comment that code.
What's different between local and remote/WMI that I should be looking
at ?
Thanks,
Giovanni Tirloni
.
- Follow-Ups:
- Re: MapNetworkDrive local/remote
- From: Al Dunbar
- Re: MapNetworkDrive local/remote
- Prev by Date: Re: Scripting to check if 3 files exist and email it to ...
- Next by Date: Re: MapNetworkDrive local/remote
- Previous by thread: Scripting to check if 3 files exist and email it to ...
- Next by thread: Re: MapNetworkDrive local/remote
- Index(es):
Relevant Pages
|