Batch file help

Soldato
Joined
1 Feb 2006
Posts
8,188
Not sure if this is possible but I'm looking to create a batch file that will be passed in a SharePoint document library URL.

This URL will then be mapped temporarily as a network drive and assigned a letter.

I will then use to drive to perform some other tasks, then I want the path unmounted again.

Any ideas how I can do this?
 
net use x: "\\servername\sharename"
insert your generic things to do..
net use x: /d


the net use x: will map X: as \\servername\sharename
net use x: /d will remove the mapped drive
 
No point in starting a new thread really but wondered if it is possible to set a batch file to run as a different user.

In my batch file I have a call to a console application in the same directory. Is there any way I can make this call and pass in a different username?

Or should I just run the whole batch script as a different user?
 
Back
Top Bottom