Jump to content

REG DELETE command... help needed.


Recommended Posts

Hey again.

So I want to make a batch file that will delete the following registry entries for me to disable auto login... but I am getting stumped. I used the programs /? command but it still did not help me out. I am doing something wrong, but not sure what.

The keys to delete are here:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="Hades"
"DefaultPassword"="*****"
"AutoAdminLogon"="1"

And here are the two different batch files I have tried to use... neither of them working.. I realize I am probably overlooking something entirely.. but I am new to doing reg work with command prompt and so I do not quite understand it all that well.

REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\DefaultUsername" /f
REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\DefaultPassword" /f
REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon\AutoAdminLogon" /f

And the second one I tried was this:

REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon /v DefaultUsername" /f
REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon /v DefaultPassword" /f
REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon /v AutoAdminLogon" /f

So yeah... if anyone could help me with the correct commands I would be forever grateful. Thanks!

Link to comment
Share on other sites


Aha... I got it!

Turns out I needed to move around the quotation marks.

REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon /v DefaultUsername" /f

needed to be:

REG DELETE "HKLM\Software\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUsername /f

Link to comment
Share on other sites

Try REG DEL instead of REG DELETE.

Or you can try using regedit and a minus sign to delete the key..

For instance:

Windows Registry Editor Version 5.00

[HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Runonce]

"^SetupICWDesktop"=-

This works for me.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...