 | | Welcome to Windows 7 Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows 7. The Windows 7 forum also covers news and updates and has an extensive Windows 7 tutorial section that covers a wide range of tips and tricks. | Windows 7 - turn on guest account via batch file
|
10-07-2009
|
#1 | | |
turn on guest account via batch file Hi, not sure this really belongs to the network forum, but in the absence of a "User account" forum and given that my issue is about the "net user" command, I figured I would post it here.
----
I have a very weird issue here.
I am trying to enable the guest account via command line and cannot get it to work.
I am using the command "net user guest /active:yes" on Windows 7 Ultimate (and before someone asks, yes I am using elevated administrator rights on the cmd window).
The command is accepted and completes successfully, but when I go see in the Control Panel User Accounts it still says the Guest Account is off.
- Trying on a full, original Windows 7 Ultimate install did not work either (initially I was on a vLited install and I thought it was because of that, but no, it doesn't work with a full install)
What's even more weird is that if I type "net user guest" and look at the info displayed it does show "Account Active Yes", but even after rebooting the Guest account is not displayed on the welcome screen and is still turned off in the Control Panel.
So, it appears it absolutely needs to be turned on via the GUI in the User Account Control Panel. If I turn it on via the control panel and type "net user guest" in a cmd window, the information displayed is exactly the same as before when I attempted to activate the guest account via command line, with one exception: via command line it showed "Last Logon Never" but when turning on the Guest account via Control Panel it shows a logon date after "Last Logon".
I also noticed that after having turned on the guest account via the Control Panel, entering "net user Guest /active:yes" (or /active:no) will work as intended (after rebooting), it just does not work the first time if the account was never activated at least once through the Control Panel. Anyone else can confirm this, and is there a workaround or known solution?
| My System Specs | | System Manufacturer/Model Number (Custom built by myself) OS Windows 7 Ultimate x86 CPU AMD Athlon X2 5200+ Motherboard Abit KN9 SLI Memory 2 GB DDR 800 Graphics Card ATI Radeon HD4850 Sound Card Realtek HD (integrated in motherboard) Monitor(s) Displays ASUS MW221 Screen Resolution 1680 x 1050 Keyboard Saitek Eclipse II Mouse Logitech Wireless Laser PSU OCZ 500W Case Soprano Cooling Yes Hard Drives WD Velociraptor 300 GB Internet Speed Cable |
10-07-2009
|
#2 | | |
coch
this is totally out of left field but maybe there is a group security policy that by default disables either cmd>netuser or guest account. Might want to take a look in gpedit.msc
Hope this gives you an idea
Ken | My System Specs | | System Manufacturer/Model Number Dell inspiron core duo OS WDP ONLY CPU 2@2.6 Motherboard Dell/ Memory 4 gigs Graphics Card intel 945 Sound Card HD built-in Monitor(s) Displays svga Screen Resolution 1440x960 Keyboard yep Mouse nope PSU 40W Case cheap plastic Cooling none Hard Drives 1-1tb
4-250gb
2-500gb
8-40gb Internet Speed 45Mb down 5Mb up |
10-07-2009
|
#3 | | |

Quote: Originally Posted by coch I am trying to enable the guest account via command line coch, just curiosity: why? | My System Specs | | System Manufacturer/Model Number Wally, Innc. OS Windows 7 x64 finally! CPU AMD Athlon II X2 240 Motherboard Biostar TA790GX XE Memory OCZ Platinum 4GB DDR2 1066 (will not work past 800MHz) Graphics Card MSI R4670-MD1G Radeon HD 4670 1GB 128-bit GDDR3 Sound Card ATI High Definition Audio Device Realtek ALC888 Monitor(s) Displays HP w19e Screen Resolution 1440x900 Keyboard wired, many keys Mouse HP wireless, 2 buttons, 1 wheel PSU Athena Power Micro ATX 400W Case HEC 6T 6T10BB Black MicroATX Mini Tower Cooling stock Hard Drives Western Digital Caviar Green WD5000AADS 500GB SATA
Western Digital Caviar Blue WD5000AAKS 500GB SATA Internet Speed DSL 2Mb (recently getting 1.65M!) |
10-07-2009
|
#4 | | |
zigzag3143, thanks for the quick reply.
Unfortunately I found nothing in the group policy editor. Besides, the command does complete successfully (I am not prevented from running it), it is just that it does not actually fully activate the account. wallyinnc, the reason is that I am setting up for unattended Windows 7 install, and I do have an extensive batch file that I run after Windows setup that silently installs all my programs, as well as sets up Windows settings and registry tweaks like I want it, and that includes turning on the guest account. | My System Specs | | System Manufacturer/Model Number (Custom built by myself) OS Windows 7 Ultimate x86 CPU AMD Athlon X2 5200+ Motherboard Abit KN9 SLI Memory 2 GB DDR 800 Graphics Card ATI Radeon HD4850 Sound Card Realtek HD (integrated in motherboard) Monitor(s) Displays ASUS MW221 Screen Resolution 1680 x 1050 Keyboard Saitek Eclipse II Mouse Logitech Wireless Laser PSU OCZ 500W Case Soprano Cooling Yes Hard Drives WD Velociraptor 300 GB Internet Speed Cable System Manufacturer/Model Number Wally, Innc. OS Windows 7 x64 finally! CPU AMD Athlon II X2 240 Motherboard Biostar TA790GX XE Memory OCZ Platinum 4GB DDR2 1066 (will not work past 800MHz) Graphics Card MSI R4670-MD1G Radeon HD 4670 1GB 128-bit GDDR3 Sound Card ATI High Definition Audio Device Realtek ALC888 Monitor(s) Displays HP w19e Screen Resolution 1440x900 Keyboard wired, many keys Mouse HP wireless, 2 buttons, 1 wheel PSU Athena Power Micro ATX 400W Case HEC 6T 6T10BB Black MicroATX Mini Tower Cooling stock Hard Drives Western Digital Caviar Green WD5000AADS 500GB SATA
Western Digital Caviar Blue WD5000AAKS 500GB SATA Internet Speed DSL 2Mb (recently getting 1.65M!) |
10-10-2009
|
#6 | | |
coch, I have been trying the net user command and searching for solutions, but all I could do is confirm your findings. You can activate or deactivate other accounts, but the Guest account, although it shows active with the net user command, it does not in the GUI.
Microsoft info on the command says it is meant to be run on a server. Maybe that is what is causing the problem?
Two things I found:
- Before running the net user /active:yes command, the Guest account already showed as active via the command, but not in the GUI. So it is not actually changing anything, that seems to be the default condition
- the command will show "completed succesfully" no matter what you do. I typed the parameter wrong once (no "/") and it still showed that.
Sorry I don't have an answer, maybe this helps you find it | My System Specs | | System Manufacturer/Model Number Wally, Innc. OS Windows 7 x64 finally! CPU AMD Athlon II X2 240 Motherboard Biostar TA790GX XE Memory OCZ Platinum 4GB DDR2 1066 (will not work past 800MHz) Graphics Card MSI R4670-MD1G Radeon HD 4670 1GB 128-bit GDDR3 Sound Card ATI High Definition Audio Device Realtek ALC888 Monitor(s) Displays HP w19e Screen Resolution 1440x900 Keyboard wired, many keys Mouse HP wireless, 2 buttons, 1 wheel PSU Athena Power Micro ATX 400W Case HEC 6T 6T10BB Black MicroATX Mini Tower Cooling stock Hard Drives Western Digital Caviar Green WD5000AADS 500GB SATA
Western Digital Caviar Blue WD5000AAKS 500GB SATA Internet Speed DSL 2Mb (recently getting 1.65M!) |
10-12-2009
|
#7 | | |
wallyinnc, thanks a lot for checking, I appreciate. Does not resolve the issue but at least it does not seem to be something specific to my system. I guess I'll live with it, it's a minor issue anyways. | My System Specs | | System Manufacturer/Model Number (Custom built by myself) OS Windows 7 Ultimate x86 CPU AMD Athlon X2 5200+ Motherboard Abit KN9 SLI Memory 2 GB DDR 800 Graphics Card ATI Radeon HD4850 Sound Card Realtek HD (integrated in motherboard) Monitor(s) Displays ASUS MW221 Screen Resolution 1680 x 1050 Keyboard Saitek Eclipse II Mouse Logitech Wireless Laser PSU OCZ 500W Case Soprano Cooling Yes Hard Drives WD Velociraptor 300 GB Internet Speed Cable |
10-12-2009
|
#8 | | |
Tks coch.
I actually regreted doing it, because somehow my Admininstrator account got deactivated and the other Admin I had, despite active, had a password that I didn't put there. I had to reset everything. And I truly believe I left them active and didn't touch passwords. This command seems to be trickier than I thought...
Appreciate if you leave us some feedback in case you make progress | My System Specs | | System Manufacturer/Model Number Wally, Innc. OS Windows 7 x64 finally! CPU AMD Athlon II X2 240 Motherboard Biostar TA790GX XE Memory OCZ Platinum 4GB DDR2 1066 (will not work past 800MHz) Graphics Card MSI R4670-MD1G Radeon HD 4670 1GB 128-bit GDDR3 Sound Card ATI High Definition Audio Device Realtek ALC888 Monitor(s) Displays HP w19e Screen Resolution 1440x900 Keyboard wired, many keys Mouse HP wireless, 2 buttons, 1 wheel PSU Athena Power Micro ATX 400W Case HEC 6T 6T10BB Black MicroATX Mini Tower Cooling stock Hard Drives Western Digital Caviar Green WD5000AADS 500GB SATA
Western Digital Caviar Blue WD5000AAKS 500GB SATA Internet Speed DSL 2Mb (recently getting 1.65M!) |
10-17-2009
|
#9 | | |
Hmmm.. interesting, as far as I know it is not supposed to mess up with passwords at all if typed exactly like I wrote, in fact it is not even supposed to do anything to accounts other than the Guest account. If you are sure you did not do anything else then that's a weird bug indeed.
I still have not found a solution but will post back here if I make progress. for now I am using a partial workaround, which is having my batch file issuing the command "control.exe userpasswords" which opens the uer accounts conotro,l panel from where I can turn on the Guest account manually. At least it saves me from navigating to the control panel manually (yeah, i'm lazy... I reformat often, at least once a month, and I try to minimize the repetitive tasks as much as possible). | My System Specs | | System Manufacturer/Model Number (Custom built by myself) OS Windows 7 Ultimate x86 CPU AMD Athlon X2 5200+ Motherboard Abit KN9 SLI Memory 2 GB DDR 800 Graphics Card ATI Radeon HD4850 Sound Card Realtek HD (integrated in motherboard) Monitor(s) Displays ASUS MW221 Screen Resolution 1680 x 1050 Keyboard Saitek Eclipse II Mouse Logitech Wireless Laser PSU OCZ 500W Case Soprano Cooling Yes Hard Drives WD Velociraptor 300 GB Internet Speed Cable turn on guest account via batch file problems? All times are GMT -5. The time now is 01:47 AM. |  |