Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Auto login

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,29155
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Auto login
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Auto login - 12/19/2005 6:12:20 PM   
  rudrarup


Posts: 58
Score: 0
Joined: 5/26/2005
From: Pune
Status: offline
Do anybody have a script which can generate a session whith a pc on the LAN given the IP, userID and password so that on suceeding sessions the connection doesnot prompt for the authentication.

_____________________________

Be content. Have the sporting spirit.
Trishanku.
 
 
Post #: 1
 
 RE: Auto login - 12/19/2005 11:55:32 PM   
  mbouchard


Posts: 1906
Score: 14
Joined: 5/15/2003
From: USA
Status: offline
Here is a script that I used to set the autologon info and then set boot delay to 0

Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject")
Dim WshNetwork : Set WshNetwork = CreateObject("Wscript.Network")
Dim WshShell : Set WshShell = CreateObject("WScript.Shell")
Dim strUsername, strPassword, strDomain, strComputer, objWMIService, colStartupCommands, objStartupCommand

strUSERNAME = "YourUserName"
strPASSWORD = "YourPassWordk"
strDOMAIN = "YourDomain"  'WshNetwork.Computername

'Function AddAutoLogon()
   ' Add autologon information to the registry
   wshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\AutoAdminLogon", "1", "REG_SZ"
   wshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\ForceAutoLogon", "1", "REG_SZ"
   wshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultDomainName", strDomain, "REG_SZ"
   wshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultPassword", strPassword, "REG_SZ"
   wshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\DefaultUserName", strUsername, "REG_SZ"
'End Function

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
   & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colStartupCommands = objWMIService.ExecQuery _
   ("Select * from Win32_ComputerSystem")

For Each objStartupCommand in colStartupCommands
   objStartupCommand.SystemStartupDelay = 0
   objStartupCommand.Put_
Next


Msgbox "Done"
      

_____________________________

Mike

For useful Scripting links see the Read Me First stickey!

Always remember Search is your friend.

(in reply to rudrarup)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Auto login Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts