# Local Group Policy to map a network drive?



## HunterjWizard (Dec 11, 2007)

Hey all, stuck against a bit of a wall, here. I have a bunch of vista computers and I need them to automatically map a network drive whenever the user logs in.

In the past, we've used a login script and a .bat file to create the shares. But we're getting ready to switch over to vista, but the login script doesn't work under vista.

I've heard that its better to use Group Policy for this, but I cannot figure out how to do it using LOCAL GROUP POLICY. I've found about 100 or so guides for doing it using active directory/serverside things, but we're not on active directory, so that's not an option.

I'm sure there is a policy somewhere, can anyone direct me to it?


----------



## spunk.funk (May 13, 2010)

When you map a drive on the workstation, and put a check in the box Reconnect on Logon (sign-in) it will reconnect every time.


----------



## JMPC (Jan 15, 2011)

Startup script for all users profile would accomplish this. 
Something like:

```
net use M: \\server\folder /persistent:yes
```


----------



## HunterjWizard (Dec 11, 2007)

@spunk.funk we have about 400 users cycling through 30 computers. The mapped drive doesn't follow them from computer to computer when you do it that way and the users aren't exactly tech-savy enough to just map it themselves(most are about 8 and under, its an elementry school)

We are already attempting to use a batch file, we've been using one in XP and it looks like this:

@echo off
::Map media folder to user's My Computer
net use m: /d
net use m: \\###.###.#.###\media /p:n
net use i: \d
net use i: \\###.###.#.###\inbox /p:n

::Force Wallpaper to CCS default
REG ADD "HKCU\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "c:\back.jpg" /f
::Stretch file to fit the desktop
REG ADD "HKCU\Control Panel\Desktop" /v WallpaperStyle /t REG_SZ /f /d 2
:on't tile image
REG ADD "HKCU\Control Panel\Desktop" /v TileWallpaper /t REG_SZ /d /f 0
RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters

(IP address obscured, it also sets the desktop background) The problem is when we run that file under Vista, Vista asks us to authenticate to the server. Normally a command prompt window pops up for a few seconds, runs the batch, then disappears. On Vista, it comes up and asks for a username and password before it will finish mapping the drive.

The username is Guest with no password. Is it possible to simply add that information to the batch file?


----------

