|
Answer» Hello All.
This is the situation that I am in, and I hope someone can help me out here.
I am on one domain, and I have to map DRIVES to my Parent Companies servers which reside on another domain.
I currently have something like this..
Net User T:\\Servername\Public /persistent:YES Net User U:\\Servername\Public /persistent:YES Net User V:\\Servername\Public /persistent:YES Net User W:\\Servername\Public /persistent:YES Net User X:\\Servername\Public /persistent:YES Net User Y:\\Servername\Public /persistent:YES
The problem is, that the user IDs arent the same on Domain 1 as they are on Domain 2. So when the script launches at startup, they need to logon once for every map in this Command Prompt before they even get to launch any apps. This ISNT the best solution for my users, but My Company was taken over, and the parent company and mine dont play nice together.
Is there a way to Prompt for a Domain\User and Pass at the beginning, and have it only ask once? Or have it logon to their domain so that all there server are available?
FYI: Cant add PCs to their domain as they havent made me a DA on their domain, and I dont think they will.
please Advise::I assume these computers are running Windows 2000 / XP?
If so, you could do something like: Code: [Select]setlocal SET /p un=Enter Domain\Username: set /p pw=Enter your password: Net Use T:\\Servername\Public /persistent:YES /user:%un% %pw% Net Use U:\\Servername\Public /persistent:YES /user:%un% %pw% Net Use V:\\Servername\Public /persistent:YES /user:%un% %pw% Net Use W:\\Servername\Public /persistent:YES /user:%un% %pw% Net Use X:\\Servername\Public /persistent:YES /user:%un% %pw% Net Use Y:\\Servername\Public /persistent:YES /user:%un% %pw%Ahhh..
Mucho Grassy A$$...
I did it in VB Script since it was kind of time limited, but that is great none the less..
Thank you GuruGary.
FYI here is the VBscript I used. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: DIM sUser DIM sPassword Dim Command msgbox "Please follow the prompts. Be sure you have the correct logon information.", vbokonly, "MESSAGE" sUser = inputbox("Please enter Domain\Username","User Name") sPassword = inputbox("Please enter MS Domain Password","Password") set WshShell = CreateObject("WScript.Shell")
Command = "Net Use Q: \\Server\Share " & sPassword & " /user:" & sUser & " /PERSISTENT:YES " WshShell.Run Command,1, false
Command = "Net Use R: \\Server\Share " & sPassword & " /user:" & sUser & " /PERSISTENT:YES " WshShell.Run Command,1, false
Command = "Net USE S: \\Server\Share " & sPassword & " /user:" & sUser & " /PERSISTENT:YES " WshShell.Run Command,1, false
Command = "Net Use P: \\Server\Share " & sPassword & " /user:" & sUser & " /PERSISTENT:YES " WshShell.Run Command,1, false
Command = "Net Use \\Server\Share " & sPassword & " /user:" & sUser & " /PERSISTENT:YES " WshShell.Run Command,1, false
Command = "Net Use V: \\Server\Share " & sPassword & " /user:" & sUser & " /PERSISTENT:YES " WshShell.Run Command,1, false
Command = "Net Use W: \\Server\Share " & sPassword & " /user:" & sUser & " /PERSISTENT:YES " WshShell.Run Command,1, false
Command = "Net Use X: \\Server\Share " & sPassword & " /user:" & sUser & " /PERSISTENT:YES " WshShell.Run Command,1, false
Wscript.Sleep 100
WshShell.AppActivate(WinPath)
|