Kaseya Community

Send Ctrl-Alt-Del and Enter, via script

  • Hello. I am looking for a way to Ctrl-Alt-Del and Enter, via script.

    REASON: We have a few computers running apps (telephone system logging, etc) that we need to log in after a reboot. I have configured the registry to auto logon, but my problem is that there is a group policy that displays a popup message at logon, which requires an Enter/click OK button.

    To get around this, I was thinking that I could create a modified reboot script, that waits 10-15 minutes after the reboot, and then sends a Ctrl-Alt-Del and Enter. That shoudl do the trick for the login, I just dont know how to accomplish it via Kaseya scripting.

    Thanks in advance.

    Lloyd

    Legacy Forum Name: Send Ctrl-Alt-Del and Enter, via script,
    Legacy Posted By Username: lwolf
  • How about creating and AutoIt3 script? It will run from the command line and will allow you to send keystrokes to a computer. You can also do cool things like move the mouse around and use mouse clicks. I have never tried it for this purpose, but I don't see a reason why it wouldn't work.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: ericpeterson
  • ericpeterson,

    Thanks very much for your suggestion. I had heard of AutoIt3, but never used it.

    I downloaded it, installed it, and began to play and research this morning. I found my way to the Help File, and found myself in the Function Send section. I was so excited, until I saw the sentence "Windows does not allow the simulation of the "CTRL-ALT-DEL" combination."

    So, it looks like AutoIt3 will not work, and possibly nothing would either. Rats.

    Thanks anyway. I appreciate the recommendation.

    Lloyd

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: lwolf
  • Not sure if this will help, but you can control the use of CAD and the Logon Legal Notice via the registry at:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

    Settings:
    DisableCAD - Set to 0 for False, 1 for True
    LegalNoticeCaption - String of Text or set to empty string to disable
    LegalNoticeText - String of Text or set to empty string to disable

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: pcmnetmanage
  • Gred,

    Thanks for the reply. In our case, we do want/need the Ctrl-Alt-Del to logon, as well as the Legal Notice on the computers.

    So, I am tryign to find a way to script pressing Ctrl-Alt-Del and clickign okay - so that I could fire the script - on these special machines, if I found that no user is logged in.

    Sounded simple to me at first, but it is turnign out to be near impossible.

    Lloyd

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: lwolf
  • Download tweakUI and configure the autologon setting to log yourself on, then set the screen saver to kick off with a password after 1 minute to lock the computer.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: ezmsp
  • Wouldn't the easier answer be to remove this/these computers from the specific group policy? Whilst its the least technical, it does solve a lot of effort Smile

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: Anthony Michaud
  • lwolf
    I was so excited, until I saw the sentence "Windows does not allow the simulation of the "CTRL-ALT-DEL" combination."


    Windows might not allow for a software program to invoke this key combo, but it's certainly possible to send it by faking a keyboard. VNC does this (right click the VNC window in the taskbar and click "send Ctrl+Alt+Del"). VBScript allows for the sending of "^%{DELETE}" which sends Ctrl+Alt+Del (see here: http://www.devguru.com/Technologies/wsh/quickref/wshshell_SendKeys.html)... Not sure if that suits your purposes. It certainly sounds like a fun project to make work.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: arobar
  • For that systems and block the policy that shows the pop up.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: rvines@axcelltech.com
  • I'm trying to find a way to do this to..

    The VBscript method doesn't work.

    Also tried a one liner in AutoIT but it doesn't work either: Send("^!{DELETE}")

    I want to run some spyware removal tools overnight, but they pop up with windows, so I doubt they can run without someone being logged in. Love to find a solution to this.

    Cheers,
    Daniel

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: djmundy
  • I wonder how VNC gets around this... something to do with it running as a service maybe?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: djmundy
  • I don't understand why you don't just disable the logon message GPO for these computers and use the AutoLogon feature to automatically log a user on to these systems.

    Michael

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: RCS-Michael
  • Because I don't want the PC to auto-logon any time except for when I am running scripts at night. During the day, the client should have to enter their domain logon/password.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: djmundy
  • This is what we use:

    http://www.softtree.com/24x7/archive/51.shtml

    Gabe

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: gabe
  • gabe


    This is great! It actually works! Except...

    After logging in, the script (calling logon.exe) reports success.. but the desktop never shows. Also "CTRL+ALT+DEL" doesn't do anything.

    I thought, no worries, I'll just run another script to run explorer.exe - this works, and I can run any other script. But I can't log off. I also notice an application in the task manager (by right clicking the clock, I can't use CTRL+ALT+DEL) which I can't kill.

    Any ideas? Do you experience the same behaviour?

    It doesn't seem too bad of a side-effect, but some dialog boxes I can hear the beep, but it never shows on screen.

    Thanks,
    Daniel

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: djmundy