Workgroup: map drives for all local accounts

SwiftNet

New Member
The scenario:

40 users, 3 workstations, 1 NAS fileshare. These workstations move on quite often and we replace them with other donated systems.

We have a batch file that adds all user accounts to each machine.

I would like these machines to map drives upon user account login. I understand I can manually add a script to each account but I'd like a cleaner way. I know a GPO can do this on a domain, but these machines are on a workgroup. I tried using a localpolicy to add the script to 'scripts/logon' but it did not work. I tried under both user account and computer.

I tried entering the unc path under profile under the localuser policy manager, but it wants a relative path, which \\servername\sharename\batch.bat is. I'm guessing that Windows will not allow access to a server in this section when not domain joined.

Any other options?
 
Since the machines are on a workgroup, using Group Policy is not an option. However, there are a few alternative methods you can use to automatically map drives for each user account on the workstations:

1. Startup folder method:
- Open the "Startup" folder for each user account (located in the "Start" menu).
- Create a shortcut to the batch file that maps the drives.
- The batch file will run automatically when the user logs in and map the drives.

2. Task Scheduler method:
- Open Task Scheduler on each workstation.
- Create a new task that runs at user logon.
- Configure the task to run the batch file that maps the drives.

3. Registry method:
- Open the Registry Editor (regedit).
- Navigate to the following key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
- Create a new String value with a suitable name.
- Set the value of the String to the full path of the batch file.
- The batch file will run automatically when the user logs in and map the drives.

Note that for the startup folder and Task Scheduler methods, you will need to create or modify the batch file to map the drives correctly. Here's an example of how you can do this using the "net use" command:

```
@echo off
net use X: \\NAS\Share /PERSISTENT:YES
net use Y: \\NAS\Folder /PERSISTENT:YES
```

Replace `\\NAS\Share` and `\\NAS\Folder` with the UNC paths to your desired network locations. You can add as many "net use" commands as needed to map different drives.

Remember to test these methods on a test machine before applying them to all workstations.
 
I appreciate the response.
The registry method is what I was using to map drives, but i could only do one drive. With your guidance, I changed it to run a batch file that maps the drives. This worked. I appreciate the help!
 
Back
Top