Question : Partner

Hi,

I'm trying to execute a net use command at a DOS prompt that will map a drive on another server outside its domain. I can do it with in windows and it will prompt me for password. this works, but I have a need to do this outside of windows (command prompt) I use the command:

net use g: \\192.168.67.2\primary * /user:tscnovi\sbsadmin

That will work but prompts for the password. Im running a SQL script at night and need to supply password automatically.

ANY IDEAS?

Answer : Partner

The " * " in the command is actually a "switch" to prompt for a password (and display stars when it's typed rather than 'printing' it to the screen). If you want to supply the password put it in place of your *.

net use g: \\192.168.67.2\primary mypassword /user:tscnovi\sbsadmin

NOTE - just stating the obvious, bear with me; you have to type the password in plain text  - it can be seen by anyone with access to the file.  
Random Solutions  
 
programming4us programming4us