map password protected drive on server

MBMSOFT

Registered User.
Local time
Today, 21:25
Joined
Jan 29, 2010
Messages
90
I need to map drive on server which is password protected ....
so i used this:

Code:
persistent = false
set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "driveletter:", "\\server\sharename", persistent, "username", "password"

but I get an Error 424 'object required'
in this:
set objNetwork = WScript.CreateObject("WScript.Network")

what is wrong
should i install something or....

any idea to solve this... or some other method to map password protected drive
 
Loose the WScript before the CreateObject, simply use.
Code:
objNetwork = CreateObject("WScript.Network")
 
it is working fine now..
thanks
 

Users who are viewing this thread

Back
Top Bottom