Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: .reg file that does not need confirmation to run

19 Feb 2016   #1
JoshuaLawrenc

New York
 
 
.reg file that does not need confirmation to run

My work computer turns on every morning at 3:00 to get updates. IF there are updates then the registry is rewritten and my auto login is gone. It takes a good 10-15 minutes to login so I have this .reg script to make my computer auto login

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AutoAdminLogon"="1"
"DefaultUserName"="myname"
"DefaultPassword"="mypass"
"DefaultDomainName"="Domain"

When it runs I get two popups:
Adding info can unintentionally change or delete values....do you trust this file. [yes] [no]
after I click yes I get
The keys and values have been successfully added.

is there a way to run a .reg file with no popups. I want to go to gpedit.msc"\windows settings\scripts\startup" and shutdown and add my script, but the popups make the shutdown process freeze. And when I tried startup, nothing happened. It didn't freeze or do anything. How can I cleanly run this file?


My System SpecsSystem Spec
.
19 Feb 2016   #2
torchwood

W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
 
 
regedit

Hi Joshua,
Regarding the yes/no prompt, it can be done in 2 different ways
Lower UAC setting to Never, or creating a Task with the following, see screenshot, roy = User (Joshua?)

removing the Message promp requires the /s, (silent) added to the task

Roy


Attached Thumbnails
.reg file that does not need confirmation to run-skipuac.png  
My System SpecsSystem Spec
19 Feb 2016   #3
JoshuaLawrenc

New York
 
 
Thanks, but over my head.

I went to lower the UAC and it was already on "never", then I went to add /s and wherever I added it, no change. Attached you'll see a picture of my scripts. I'm sure you'll see the error right away, I'm trying to learn my batch and VBS scripting. I want to load "auto_login" then shutdown, while giving myself a way out if I need to work longer.

Thanks a million.


Attached Thumbnails
.reg file that does not need confirmation to run-regedit.jpg  
My System SpecsSystem Spec
.

19 Feb 2016   #4
torchwood

W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
 
 
have a look

Hi Joshua,
Have a look at this thread.

https://www.google.co.uk/url?sa=t&rc...ciLgI9uWp1uv3A


Roy
My System SpecsSystem Spec
22 Feb 2016   #5
JoshuaLawrenc

New York
 
 
Almost

Thank you, I thought I had it, but when I would go to cmd and type
powershell =file "C\path\to\script.reg" -noexit
I got an error
Processing -File...failed because the file does not have a '.psi' extension.

Is there a way to do that with a .reg or .bat extension?
My System SpecsSystem Spec
22 Feb 2016   #6
UsernameIssues

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by JoshuaLawrenc View Post
My work computer turns on every morning at 3:00 to get updates. IF there are updates then the registry is rewritten and my auto login is gone. It takes a good 10-15 minutes to login....
Since this is your work computer, we need to be careful not to help you make changes that go against what your IT department wants.

The removal of the auto logon settings in the registry is not done by Windows updates - so it must be done by group policy updates and/or scripts setup by your IT department. It seems obvious that the IT staff does not want this computer to automatically log a user on.

Have you asked IT support why the computer takes 10-15 minutes after logon before it is of use to you?


Quote   Quote: Originally Posted by JoshuaLawrenc View Post
I went to lower the UAC and it was already on "never",
That is really scary. That breaks so many things in the Windows security model.
My System SpecsSystem Spec
26 Feb 2016   #7
JoshuaLawrenc

New York
 
 
I am on the IT staff

Yes I have made the registry adjustments myself. The auto login is OK because we also have a scheduled task to lock the computer directly after login. Then everything will be loaded but secure behind my password.
My System SpecsSystem Spec
26 Feb 2016   #8
UsernameIssues

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by JoshuaLawrenc View Post
...IF there are updates then the registry is rewritten and my auto login is gone...
What software/script is removing the auto logon settings?
My System SpecsSystem Spec
29 Feb 2016   #9
JoshuaLawrenc

New York
 
 
Regedit

I opened regedit, went to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
then set the values of DefaultUserName DefaultPassword and set AutoAdminLogin to 1
My System SpecsSystem Spec
29 Feb 2016   #10
UsernameIssues

W7 Pro SP1 64bit
 
 

In your original post, you state:
"IF there are updates then the registry is rewritten and my auto login is gone."

I mentioned:
"The removal of the auto logon settings in the registry is not done by Windows updates - so it must be done by group policy updates and/or scripts setup by your IT department."

After which you stated:
"I have made the registry adjustments myself."
I know that. I'm talking about how your settings are getting removed.

So I directly asked:
"What software/script is removing the auto logon settings?"

And again you mentioned your actions:
"I opened regedit, went to"
Again, you are telling me how you added the settings...
...I'm talking about how your settings are getting removed.


I guess I'm not being clear. I know what settings you are changing. I know how you are changing those settings. I know why you are changing them. I know that you want to automate the changes to those settings. Rather than spend your time making those changes after updates*, I was suggesting that you stop the updates* from undoing your auto logon settings.

*we are still not sure what updates you are talking about. I'm guessing group policy updates.



To state things another way:
1) the computer wakes at 3am
2) if updates are applied, the auto logon settings are removed
3) you desire to automatically re-enter the auto logon settings
(user prompts are a problem)

You made this thread because you ran into user prompt problems with step #3. I'm suggesting that you spend your time preventing step #2 from undoing your auto logon settings. Someone in your company should know what script is removing those auto logon settings on this computer.

Group policies can be used to tell a computer to run a particular set of scripts at logon or at other times. Which policies to apply and which scripts to run for a given computer are often controlled by Active Directory (AD) Organizational Units (OU). If you went through the proper channels at your company, then this computer might be moved to an OU that does not force the removal of the auto logon settings.

There is also an AD computer property setting called "Member of". A computer can be made a member of an exception group. The scripts that removes auto logon settings can be written in such a way as to check the "Member of" list and skip the removal of the auto logon settings... if the computer is authorized to auto logon.


There are ways to automatically add the auto logon settings without getting user prompts... but helping you to do that would be creating one script to fight another script. It is just not the best thing to do. Since you are in IT, your manager should know who to contact about preventing the auto logon settings from being removed.
My System SpecsSystem Spec
Reply

 .reg file that does not need confirmation to run




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
No confirmation that Malwarebytes has actually been scanning
I am running the trial version and will probably buy the full version. I have set Notifications to remain for 12 secs but haven't noticed any notifications, probably because I haven't been at the computer at 15:00 when Malwarebytes runs. I can see in the Dashboard that the next scan will be at the...
System Security
PC Build Confirmation
Goodmorning! First of all, I would like to thank, and express my gratitude for all the help that I have recieved on this forum. You guys truly are great, and have helped me out of some rough spots. :p To inform you all, (thanks to you) I am attempting my second batch of PC builds!...
PC Custom Builds and Overclocking
750GB HDD need confirmation
http://i.imgur.com/tXPNd.png Is it correct or not? For a 750GB HDD, it shows only 279gb for C drive.
Hardware & Devices
Can I use the same confirmation ID to activate Windows?
Hello. I have Windows 7 installed, and I activated it via phone activation. Now it's starting to run slow after using it for a year. I would like to reformat with a clean installation. My question is can I activate it using the same confirmation ID that I got before?
Windows Updates & Activation
BSOD driver confirmation
Hi. Just got bsod for the first time since re-installing windows 7. Attached is my jcgriff toolfile. Could someone please check what caused the problem? I believe it's my network card driver (netr6164.sys) but I would like someone to confirm it before i try and correct the problem. Thanks in...
BSOD Help and Support
I need confirmation regarding customization
hello.. i've been browsing a thorough research on how to install a custom 3rd party themes on my laptop.. i did a few research such as how to make a restore and set a backup system just in case something go WRONG :confused: this is because installing custom themes involve "modification" of a few...
Themes and Styles


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 17:19.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App