Jump to content

Legal Notice At Login


byteme
 Share

Recommended Posts

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......

Link to comment
Share on other sites

  • Developers

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...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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?

Link to comment
Share on other sites

  • Developers

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:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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

Link to comment
Share on other sites

  • Developers

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.......

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...