Solved

Restarting a computer using a batch file and log into a user account

Posted on 2012-04-04
5
476 Views
Last Modified: 2012-04-09
This is a continuation of a previous question.

I've setup Windows Task Scheduler to run a small batch file that restarts a computer that needs to be restarted on a regular/automatic schedule.

shutdown /r

Works beautifully as a .BAT file.

What can i add to this code to actually logon as a specified user after the machine restarts:

DomainName\GenericUserName


As always, Thanks in advance EE!
jpertchik
0
Comment
Question by:jpertchik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 21

Accepted Solution

by:
oleggold earned 250 total points
ID: 37808264
You have to configure group policy for this to use in windows ,dos doesn't have a logon ,if You use Novell ,this is implemented by their policy too
0
 
LVL 6

Assisted Solution

by:HomerTNachoCheese
HomerTNachoCheese earned 250 total points
ID: 37808351
Look over this website.

You could add the registry settings to a script that runs with your batch.

http://www.petri.co.il/configuring_autologon.htm

You could have a startup script that also clears the registry settings if you want.
0
 

Author Comment

by:jpertchik
ID: 37811324
HomerTNachoCheese,

I went to the site you mentioned. This is Win 7 and the keys look somewhat different. See attached screen cap, Please advise what to change.

Thanks,
jpertchik
ForHomerTNachoCheese.JPG
0
 
LVL 70

Expert Comment

by:Qlemo
ID: 37821230
The keys are exactly the same for Vista and W7.

If you prefer a more secure way (because the password is not stored in the reg key shown), download AutoLogon from www.sysinternals.com (http://technet.microsoft.com/en-us/sysinternals/bb963905), and either set it up manually using the GUI, or via commandline:
  autologon user domain password
It needs to run on the PC it should change AutoLogon, but I reckon this is not an issue here.
0
 

Author Closing Comment

by:jpertchik
ID: 37824083
These were partial answers that were given. I decided to go with the answer to a previous question. It was so similar in nature minus the automatic log in. It is not needed at this point.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question