Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6974793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:17:01+00:00 2026-05-27T17:17:01+00:00

I am doing some automation work that requires several reboots. I am trying to

  • 0

I am doing some automation work that requires several reboots. I am trying to allow my server to auto logon with the admin account. I can get it working locally, but when I try to do it as a member of the domain it fails.

It appears to me that it is not even trying to perform the logon. If I put a invalid password into the defaultpassword field (when loging on locally) it will present me with a bad password message, just as if I typed it from the keyboard. If I do the same thing to the domain, it does nothing.

Here is the code I am using and have found ref’d on on several different sites and used:

'==========================================
'VBScript: enableAutoLogon.vbs            =
'This VBScript updates the registry to    =
'enable auto-logon.  Modify the three     =
'strings in brackets, under "Define       =
'keys and values".                        =
'Courtesy of Jonathan Almquist            =
'monsterjta @ tek-tips                    =
'==========================================
Option Explicit
'''Declarations'''
Dim objShell
Dim RegLocAutoLogon
Dim keyDefaultDomainName
Dim valDefaultDomainName
Dim keyDefaultUserName
Dim valDefaultUserName
Dim keyDisableCAD
Dim valDisableCAD
Dim keyAutoAdminLogon
Dim valAutoAdminLogon
Dim keyForceAutoLogon
Dim valForceAutoLogon
Dim keyDefaultPassword
Dim valDefaultPassword

''''Define keys and values''''
RegLocAutoLogon = "HKLM\Software\Microsoft\" & 
  _"WindowsNT\CurrentVersion\Winlogon\"
keyDefaultDomainName = "DefaultDomainName"
valDefaultDomainName = "[your domain name here]"
keyDefaultUserName = "DefaultUserName"
valDefaultUserName = "[your default user name here]"
keyDisableCAD = "DisableCAD"
valDisableCAD = 1
keyAutoAdminLogon = "AutoAdminLogon"
valAutoAdminLogon = "1"
keyForceAutoLogon = "ForceAutoLogon"
valForceAutoLogon = "1"
keyDefaultPassword = "DefaultPassword"
valDefaultPassword = "[your password here]"

Set objShell = CreateObject("WScript.Shell")
objShell.RegWrite RegLocAutoLogon & _keyDefaultDomainName, 1, "REG_SZ"
objShell.RegWrite RegLocAutoLogon & _keyDefaultDomainName, valDefaultDomainName, "REG_SZ"
objShell.RegWrite RegLocAutoLogon & _keyDefaultUserName, 1, "REG_SZ"
objShell.RegWrite RegLocAutoLogon & _keyDefaultUserName, valDefaultUserName, "REG_SZ"
objShell.RegWrite RegLocAutoLogon & _keyDisableCAD, 1, "REG_DWORD"
objShell.RegWrite RegLocAutoLogon & _keyDisableCAD, valDisableCAD, "REG_DWORD"
objShell.RegWrite RegLocAutoLogon & _keyAutoAdminLogon, 1, "REG_SZ"
objShell.RegWrite RegLocAutoLogon & _keyAutoAdminLogon, valAutoAdminLogon, "REG_SZ"
objShell.RegWrite RegLocAutoLogon & _keyForceAutoLogon, 1, "REG_SZ"
objShell.RegWrite RegLocAutoLogon & _keyForceAutoLogon, valForceAutoLogon, "REG_SZ"
objShell.RegWrite RegLocAutoLogon & _keyDefaultPassword, 1, "REG_SZ"
objShell.RegWrite RegLocAutoLogon & _keyDefaultPassword, valDefaultPassword, "REG_SZ"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:17:02+00:00Added an answer on May 27, 2026 at 5:17 pm

    This code works fine joining to our 2008 DC. What I believe the problem was has to do with some of our security settings and possilby kerberos between a 2008

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing some COM Interop work with Excel and other Office Automation Software.
I'm doing some automation work and can make my way around a site &
I am doing a bit of work on some of our HLSL shaders, trying
Okay, so I'm doing some good OLE' (sorry) automation with ruby and I ran
In doing some bioinformatics work, I've been pondering the ramifications of storing object instances
While doing some refactoring I've found that I'm quite often using a pair or
I am doing project in powerpoint 2007 automation. In that i am using macro
I am doing some automation for a client and was planning on running some
I'm doing some basic automation type stuff and I need to send ctrl-space to
I'm trying to create a toolbar button that inserts a footer (including some buttons)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.