Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

How to create a batch file to map network drives

This document describes how you can create a batch file to map network drives and
set it as a scheduled task. This can be useful for when the network drive mappings
are initially created using administrative privileges or through domain login scripts,
but then the mapped drives are not available when running the AccuMark
applications.

You can see this in an example using a command prompt, and using the command
“net use” and you see the mapped network drives with an OK status:

However, if you now open a command prompt – and Run As Administrator and now
use the command "net use" you will either (1) not see the network drive mappings
or (2) see the network drives but the Status will show "Unavailable":

To get a working connection for AccuMark Hardware Configuration, Backups,


MultiPlotter, shared Plotting or shared Digitizing perform a re-mapping of the
network drives in an elevated environment, then set it as a scheduled task so it will
be performed daily.

1
1. Create a TEXT file net.txt in C:\
Enter text with the network drive information as below:
“sumima-pc\c" = the network drive you want to map
“W” = specify the letter for the drive
“Cad889” = password to login network drive
“sumi.ma” = the user name to login

2. Change net.txt to net.bat:

3. Open Start menu>All Programs>Accessories>System Tools>Task Scheduler:

2
4. Highlight “Task Scheduler Library’ and click “Create Task”:

5. Enter task name, check ”Run with highest privileges” option:

Go triggers tab, create new, select “At log on”:

3
Go Actions tab, create new, select the net.bat:

New Task is done.

4
6. Open Start menu, enter UAC to open user account control settings.
Choose “Never Notify”:

7. Reboot, the network drive W


is auto mapped:

You might also like