Jump to content

How do i run a script before logon-mayb as service?


rmusick
 Share

Recommended Posts

All of our Windows XP workstations have the Windows Logon Caption enabled. You have to click the OK button or press enter before you can get to the login box. This presents a problem for us when we want to remote AutoAdmin login the workstations. Is there a way that I can send a script down using something like Altiris, Landesk, SMS, etc that can do this. I heard maybe create my script as a service but I dont know how to do that. here is my code.

WinWait("!!!WARNING!!!","")

If Not WinActive("!!!WARNING!!!","") Then WinActivate("!!!WARNING!!!","")

WinWaitActive("!!!WARNING!!!","")

Send("{ENTER}")

Link to comment
Share on other sites

All of our Windows XP workstations have the Windows Logon Caption enabled. You have to click the OK button or press enter before you can get to the login box. This presents a problem for us when we want to remote AutoAdmin login the workstations. Is there a way that I can send a script down using something like Altiris, Landesk, SMS, etc that can do this. I heard maybe create my script as a service but I dont know how to do that. here is my code.

WinWait("!!!WARNING!!!","")

If Not WinActive("!!!WARNING!!!","") Then WinActivate("!!!WARNING!!!","")

WinWaitActive("!!!WARNING!!!","")

Send("{ENTER}")

No. If you have the right admin permissions to the computer to setup auto admin, then you just use remote registry access to save the notice text, clear it, and set your auto admin login credentials. After the auto admin logon, just write the notice text back to the registry.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

  • Developers

Are you talking about the legal Banner?

Maybe you could update the registry remotely before login on:

; Remove Manual Banner at logon ... will need to be added back manually
      RegDelete("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WinLogOn", "LegalNoticeCaption")
      RegDelete("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\WinLogOn", "LegalNoticeText")
    ; Remove Banner at logon ... will be restored with the next policy sync
      RegDelete("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\", "legalnoticecaption")
      RegDelete("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\system\", "legalnoticetext")

Just add the target host to the regDelete statements.

Jos

Edited by Jos

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

yes its the legal banner. I have all of the information to strip it out and I have all of the information to add the AutoAdmin login. My problem is that even if you strip out the registry information for the banner you still need to some how send an enter keystroke or press the ok button for it to get by the banner.

Link to comment
Share on other sites

yes its the legal banner. I have all of the information to strip it out and I have all of the information to add the AutoAdmin login. My problem is that even if you strip out the registry information for the banner you still need to some how send an enter keystroke or press the ok button for it to get by the banner.

Get by what banner? If there is a banner, then you haven't removed them or they got put back. If they are enforced by policy, then they get restored when you reboot. That would mean temporarily changing the policy.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

  • Developers

yes its the legal banner. I have all of the information to strip it out and I have all of the information to add the AutoAdmin login. My problem is that even if you strip out the registry information for the banner you still need to some how send an enter keystroke or press the ok button for it to get by the banner.

I understand this is the case when you run the script on the remote workstation and that is why I stated to do a regedit first before shelling the script remotely.

Maybe you could describe what it is you are exactly trying to do remotely?

Edited by Jos

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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