Network Drive Mappings and NET USE
The following information pertains to Windows and the SmartBatch Executive Server running as a Service.
A Service provides a batch logon as opposed to an interactive logon. An interactive logon provides additional capability such as mapped drives. If you require the use of network drive letters such as f:), they must be mapped in an Operation before they are used. To do this use the NET USE capability. This can be placed in a .bat file and executed via an Operation or can be placed directly in an Operation.
The following shows the general syntax for the NET USE command:
net use [devicename | *] [\\computername\sharename[\volume]] [password | *]] [/user:[domainname\]
username] [[/delete] | [/persistent:{yes | no}]]
net use devicename [/home[password | *]] [/delete:{yes | no}]
net use [/persistent:{yes | no}]
You can type net use without parameters from a command prompt to obtain a list of network connections.
Examples
Using a .bat file
This example shows how to map three network drives using a .bat file named MyNetUse.bat:
net use o: \\LA\cdrive password /USER:myAccount
net use p:\\NY\cdrive password /USER:myAccount
net use q:\\SF\edrive password /USER:myAccount
The MyNetUse.bat file can be added as an Operation within SmartBatch.
To configure the NET USE capability directly into an Operation
cmd.exe /c net use o:\\LA\cdrive password /USER:myAccount
To delete a drive mapping
net use o: /delete