Guest twayd Posted August 2, 2007 Posted August 2, 2007 Hey All- I have a machine that's off domain, that is used by multiple users, but they need to use the shared file systems (domain member) to give presentations, etc. I'm looking for a mechanism (batch file/script) that a user can initiate that would map a drive to a predetermined path, but prompt them for their domain credentials. Can anyone assist me??? TIA
Guest Pegasus \(MVP\) Posted August 2, 2007 Posted August 2, 2007 Re: Bacth File for Drive mapping "twayd" <twayd@hotmail.com> wrote in message news:u0Ty4US1HHA.3916@TK2MSFTNGP02.phx.gbl... > Hey All- > > I have a machine that's off domain, that is used by multiple users, but > they > need to use the shared file systems (domain member) to give presentations, > etc. > > I'm looking for a mechanism (batch file/script) that a user can initiate > that would map a drive to a predetermined path, but prompt them for their > domain credentials. > > Can anyone assist me??? > > TIA > Try this: @echo off echo. set /p name=Please enter your domain user name: if "%name%"=="" goto :eof set /p password=. . . and your password: if "%password%"=="" goto :eof net use S: \\YourServer\SomeShare /user:%name% %password% net use T: \\YourServer\OtherShare There is a drawback with this method: The password is visible on the screen. To get around it you would have to use a script rather than a batch file.
Recommended Posts