Sign in to follow this  
Followers 0
byteme

Legal Notice At Login

8 posts in this topic

Hi all. I am new here, and this is my first post. I am trying to write a script that will allow me to install software as an administrator without logging people off. When the installation is complete, some software requires a reboot and login with an admin account. I have figured out how to do some regwrites to set the autologin for an administrative account. My problem is we have the legal notice that comes up after the ctrl\alt\del screen, and before the actual login screen. I need a way to remove something from the registry so that will not come up so it will be a complete login without any interaction. My script sets everything back up the way it was in the registry so that it is a one time autologin. Any help on how to disable that legal notice would be greatly appreciated. Thank you all!

p.s.- this is a GREAT product. I have been able to automate so many of my daily administrative duties......

Share this post


Link to post
Share on other sites



these are the registry keys you need to remove to get rid of these Legal notice screens:

;optional:  Remove Manual Banner at logon
RegDelete("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WinLogOn", "LegalNoticeCaption")
RegDelete("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WinLogOn", "LegalNoticeText")
;optional: Remove Banner AD Policy at logon ... 
RegDelete("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\","legalnoticecaption")
RegDelete("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\", "legalnoticetext")

You can do a regwrite when finished...

ps. These are AutoIt3 commands...


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Ok, is there any way of doing this with the AutoIt version 2? I see that regdelete is in version 2 also. whatever I delete must be put back in at the end of my script. Is there a way to copy the keys, then delete them, and have autoit put them back in after the reboot and login is complete?

Share this post


Link to post
Share on other sites

Didn't test it this but think someting like this should work..

Before the reboot do:

RegRead, kv, REG_SZ, HKEY_LOCAL_MACHINE, Software\\Microsoft\\Windows NT\\CurrentVersion\\WinLogOn, LegalNoticeCaption
IniWrite, kv, c:\\mypath\\myfile.ini, mysection, mykey
IniDelete, HKEY_LOCAL_MACHINE, Software\\Microsoft\\Windows NT\\CurrentVersion\\WinLogOn, LegalNoticeCaption

To set it back to the original value:

IniRead, kv, c:\\mypath\\myfile.ini, mysection, mykey
RegWrite,REG_SZ, HKEY_LOCAL_MACHINE, Software\\Microsoft\\Windows NT\\CurrentVersion\\WinLogOn, LegalNoticeCaption, kv

And this ofcourse for all keys you want to reset.... hope this helps :whistle:


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I will give that a try. It looks great though. Hopefully it will work. I really appreciate the help. And talk about fast, you people here are great! Thanks!

Share this post


Link to post
Share on other sites

I don't know if the previous help gave any insight, but I do have something to add if it didn't.

The registry key you are deleting is for the local machines copy of the legal notice caption ONLY!!!

NOTE: if you are on a domain this may not be comming from the local machine, and is set at the domain level.

Just an FYI

Share this post


Link to post
Share on other sites

I don't know if the previous help gave any insight, but I do have something to add if it didn't.

The registry key you are deleting is for the local machines copy of the legal notice caption ONLY!!!

NOTE: if you are on a domain this may not be comming from the local machine, and is set at the domain level.

Just an FYI

first script posted showed both registry keys.......

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Hi all. I did try the above mentioned regedits, but that still didn't work. I found that there were two other registry settings that needed deleting, so after running the following it worked gread:

Regdelete, HKEY_LOCAL_MACHINE, Software\\Microsoft\\Windows\\currentversion\\policies\\system, legalnoticecaption

Regdelete, HKEY_LOCAL_MACHINE, Software\\Microsoft\\Windows\\currentversion\\policies\\system, legalnoticetext

then I dumped a script into the administrative run once so that after it logged in automatically it replaced the two keys above. This has worked perfect for me. Thanks for all of the help!

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0