I am trying to create a batch file that will allow a user to input a login and password when it come to mapping a network drive. This is what I have so far:
net use X: \\domain.local\SharedApps /user:domain.local\LOGIN "PASS"
- I have to run this command manually in admin CMD as i dont know how to elevate it in the script. It maps the drive in CMD admin so the rest of the batch files can run.
call X:\_NewComputers\SyncDist.bat
- Syncs files that allow the running of JoinDomain
timeout 360
- SyncDist downloading files so i placed this to prevent the bat's from overlapping
call X:\_NewComputers\JoinDomain.bat
- Joins the domain and restarts the computer to run scripts for printers and Network Drives
I have removed the user and pass from the batch. I want the user to input that information so that if a random user opens the file they don't have administration credentials.
Is it even possible to do it in a batch file or would it have to be a different language and call on the batch file itself?
I can also provide the Other batch file makeups if required they are mostly linking to their respective files elsewhere in the drive. Any help is welcome.