→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rileya
Engaged Sweeper
I've read every thread, done successful deployment before and cannot get the simple cmd prompt based deployment working.

1. I create a deployment.
2. Add a step 'Command'
3. Type in 'net use S: /p:yes "\\server\location"'
4. Deploy.


Does not map the drive but running it locally (the command) works every time.

1 ACCEPTED SOLUTION
Bruce_B
Lansweeper Alumni
As mapping a network drive via Net Use requires an elevated command prompt while the user is logged on, this is unfortunately not something that can be done via the deployment module using Net Use.

You may possibly be able to map drives using another method though:

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\" /v NetDriveMap /t REG_SZ /d "net use X: \\ServerName\ShareName /persistent:yes"

View solution in original post

1 REPLY 1
Bruce_B
Lansweeper Alumni
As mapping a network drive via Net Use requires an elevated command prompt while the user is logged on, this is unfortunately not something that can be done via the deployment module using Net Use.

You may possibly be able to map drives using another method though:

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\" /v NetDriveMap /t REG_SZ /d "net use X: \\ServerName\ShareName /persistent:yes"