turn on guest account via batch file

coch

New member
Local time
4:11 AM
Messages
7
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 Computer My Computer

Computer 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(s)
ATI Radeon HD4850
Sound Card
Realtek HD (integrated in motherboard)
Monitor(s) Displays
ASUS MW221
Screen Resolution
1680 x 1050
Hard Drives
WD Velociraptor 300 GB
PSU
OCZ 500W
Case
Soprano
Cooling
Yes
Keyboard
Saitek Eclipse II
Mouse
Logitech Wireless Laser
Internet Speed
Cable
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 Computer My Computer

Computer Manufacturer/Model Number
HP Pavillion dv-7 1005 Tx
OS
Win 8 Release candidate 8400
CPU
[email protected]
Memory
4 gigs
Graphics Card(s)
Nvidia 9600M
Sound Card
HD built-in
Monitor(s) Displays
17" Wxga
Screen Resolution
1440x900
Cooling
none
Internet Speed
45Mb down 5Mb up

My Computer My Computer

Computer 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(s)
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
Hard Drives
Western Digital Caviar Green WD5000AADS 500GB SATA
Western Digital Caviar Blue WD5000AAKS 500GB SATA
PSU
Athena Power Micro ATX 400W
Case
HEC 6T 6T10BB Black MicroATX Mini Tower
Cooling
stock
Keyboard
wired, many keys
Mouse
HP wireless, 2 buttons, 1 wheel
Internet Speed
DSL 2Mb (recently getting 1.65M!)
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 Computer My Computer

Computer 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(s)
ATI Radeon HD4850
Sound Card
Realtek HD (integrated in motherboard)
Monitor(s) Displays
ASUS MW221
Screen Resolution
1680 x 1050
Hard Drives
WD Velociraptor 300 GB
PSU
OCZ 500W
Case
Soprano
Cooling
Yes
Keyboard
Saitek Eclipse II
Mouse
Logitech Wireless Laser
Internet Speed
Cable
Understood, thanks
 

My Computer My Computer

Computer 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(s)
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
Hard Drives
Western Digital Caviar Green WD5000AADS 500GB SATA
Western Digital Caviar Blue WD5000AAKS 500GB SATA
PSU
Athena Power Micro ATX 400W
Case
HEC 6T 6T10BB Black MicroATX Mini Tower
Cooling
stock
Keyboard
wired, many keys
Mouse
HP wireless, 2 buttons, 1 wheel
Internet Speed
DSL 2Mb (recently getting 1.65M!)
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 Computer My Computer

Computer 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(s)
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
Hard Drives
Western Digital Caviar Green WD5000AADS 500GB SATA
Western Digital Caviar Blue WD5000AAKS 500GB SATA
PSU
Athena Power Micro ATX 400W
Case
HEC 6T 6T10BB Black MicroATX Mini Tower
Cooling
stock
Keyboard
wired, many keys
Mouse
HP wireless, 2 buttons, 1 wheel
Internet Speed
DSL 2Mb (recently getting 1.65M!)
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 Computer My Computer

Computer 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(s)
ATI Radeon HD4850
Sound Card
Realtek HD (integrated in motherboard)
Monitor(s) Displays
ASUS MW221
Screen Resolution
1680 x 1050
Hard Drives
WD Velociraptor 300 GB
PSU
OCZ 500W
Case
Soprano
Cooling
Yes
Keyboard
Saitek Eclipse II
Mouse
Logitech Wireless Laser
Internet Speed
Cable
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 Computer My Computer

Computer 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(s)
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
Hard Drives
Western Digital Caviar Green WD5000AADS 500GB SATA
Western Digital Caviar Blue WD5000AAKS 500GB SATA
PSU
Athena Power Micro ATX 400W
Case
HEC 6T 6T10BB Black MicroATX Mini Tower
Cooling
stock
Keyboard
wired, many keys
Mouse
HP wireless, 2 buttons, 1 wheel
Internet Speed
DSL 2Mb (recently getting 1.65M!)
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 Computer My Computer

Computer 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(s)
ATI Radeon HD4850
Sound Card
Realtek HD (integrated in motherboard)
Monitor(s) Displays
ASUS MW221
Screen Resolution
1680 x 1050
Hard Drives
WD Velociraptor 300 GB
PSU
OCZ 500W
Case
Soprano
Cooling
Yes
Keyboard
Saitek Eclipse II
Mouse
Logitech Wireless Laser
Internet Speed
Cable
Back
Top