Re: basic map drive scripts



Cheers Pegasus :-)

"Pegasus (MVP)" <I.can@xxxxxxxxxx> wrote in message
news:OB4YXTU4IHA.212@xxxxxxxxxxxxxxxxxxxxxxx
Group Policy is about user rights and settings - it has no effect
whatsoever on the mechanism that controls the mapping of a
drive on top of an existing mapping. If you want to write a robust
script that works no matter what then you should test for
existing connections, e.g. like so: If objfso.DriveExists("D:") . . .


"Chris" <chris@xxxxxx> wrote in message
news:eiQ%23yLU4IHA.2348@xxxxxxxxxxxxxxxxxxxxxxx
I have done that and received the error. I am unsure if it will be
different via a gpo. Unfortunately i can't test that here. i've never ran
scripts this way before as always done it via the user account.

Cheers
Chris

"Pegasus (MVP)" <I.can@xxxxxxxxxx> wrote in message
news:uyznbGU4IHA.3624@xxxxxxxxxxxxxxxxxxxxxxx
Since you're sitting at a PC, it will take you less than a minute
to find out for yourself. Map Q: to \\YourPC\C$ manually,
then run your VB Script. You don't need a server to test such
a simple issue!


"Chris" <chris@xxxxxx> wrote in message
news:uYNypCU4IHA.4272@xxxxxxxxxxxxxxxxxxxxxxx
Hi Pegasus,

This is my job tomorrow. lol. It's been sort of dropped on me and i
have a tight deadline so was trying to do as much prep as i can..
Currently trawling google aswell. :-)

"Pegasus (MVP)" <I.can@xxxxxxxxxx> wrote in message
news:Okf3UAU4IHA.4488@xxxxxxxxxxxxxxxxxxxxxxx

"Chris" <chris@xxxxxx> wrote in message
news:uChxL2T4IHA.1192@xxxxxxxxxxxxxxxxxxxxxxx
Hello,

i need a basic map drive script which i've got.. but what happens if
it is already mapped? is there a similair /peristent option? or does
it disconnect automatically?

Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "x:" , "\\server\share"

Why don't you run a little test to see what happens if the drive
letter is already mapped?











.



Relevant Pages

  • Re: Net use command
    ... Byron Kendrick wrote: ... All mapping in the ... > like to be able to write a script to change the network drives. ... Let's say for example you want to map drive letter P: ...
    (microsoft.public.win2000.general)
  • Re: Can you create a timed loop?
    ... It calls the mapping function 3 times, and I have debugging code to show ... I tried the second suggestion, ... verify that the script was terminating after 10 seconds. ...
    (microsoft.public.scripting.vbscript)
  • Re: basic map drive scripts
    ... Group Policy is about user rights and settings - it has no effect ... whatsoever on the mechanism that controls the mapping of a ... drive on top of an existing mapping. ... then run your VB Script. ...
    (microsoft.public.windows.server.scripting)
  • Re: Really stupid mapped drive question
    ... Using the /persistent switch at the same time as mapping drives ... weren't able to map the drive off of the startup script I was using. ... the machines with the problem and machines without the problem is the ...
    (microsoft.public.windowsxp.general)
  • Re: Login Script group membership
    ... The script sees the global mappings, ... The first ifmember will return an error code indicating whether or not the ... The final block avoids mapping I: if the user is not a member of "group ... if errorlevel 1 set LS_Error=%LS_Error% I ...
    (microsoft.public.windows.server.scripting)