friends Posted December 19, 2004 Share Posted December 19, 2004 I have a LAN environment, and there are Win2K and WinXP OSes. Whenever we wanna access Win2K (Restricted User) by typing \\computer-name from WinXP, there will be a windows pop up asking for "Username" and "Password". If we entered the correct Username and Password, then only we can access to the shared folder. Is it possible to define the "Username" and "Password" in the script, so that we don't have to enter Username and Password everytime we access to the computer's shared folder ? If it is possible... mind to show me an example ? Thanks.... Link to comment Share on other sites More sharing options...
Matt @ MPCS Posted December 19, 2004 Share Posted December 19, 2004 I have never personally tried this but working through the logic... couldn't you execute a RunAsSet speciying the server of the share as the computer before accessing the share? If that doesn't work you could always do a winwait for the login box and then controlsend the username and passwords. Matt Link to comment Share on other sites More sharing options...
friends Posted December 19, 2004 Author Share Posted December 19, 2004 I have never personally tried this but working through the logic... couldn't you execute a RunAsSet speciying the server of the share as the computer before accessing the share? If that doesn't work you could always do a winwait for the login box and then controlsend the username and passwords.Matt<{POST_SNAPBACK}>I've tried that out... it does not work.I don't want to use the ControlSend method to do it.I want it to "access" directly without the user knowing it. Link to comment Share on other sites More sharing options...
t0ddie Posted December 19, 2004 Share Posted December 19, 2004 maybe hide the windows first. they will popup for maybe a split second.... just my 2 cents Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
Administrators Jon Posted December 19, 2004 Administrators Share Posted December 19, 2004 Just use DriveMapAdd - it supports a username/password. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
lyledg Posted December 19, 2004 Share Posted December 19, 2004 Or, if you wanted to go the DOS route, you could use "NET USE \\computername\sharename /USER:[domainname\]username] password" from a Run command in conjunction with Comspec.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now