Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I send Ctrl-Alt-Del via a script?

4,646 views
Skip to first unread message

topher

unread,
Jan 4, 2007, 10:58:07 PM1/4/07
to
We run a novel network and typically in the past have waited for users
passwords to expire and then let them change it via the grace periods.

Now, we need to take a proactive approach and during the login script,
we check and if it is within seven days of expiration, we need to take
them to the screen to change their password. This requires hitting
CTRL-ALT-DEL. But, I have been unable to locate a way to send this
command to the OS.

Anyone got any ideas.

Thanks

Harlan Grove

unread,
Jan 5, 2007, 1:08:59 PM1/5/07
to
topher wrote...
...

>we check and if it is within seven days of expiration, we need to take
>them to the screen to change their password. This requires hitting
>CTRL-ALT-DEL. But, I have been unable to locate a way to send this
>command to the OS.
...

While it's possible to restart Windows clients using the command

shutdown -r

there's no way to simulate pressing [Ctrl]+[Alt]+[Delete]. I recall it
was chosen precisely for this reason, to REQUIRE user interaction so
that scripts COULDN'T do precisely this.

That said, if you mean Netware passwords, Novell used to provide a
character mode command for changing passwords, and it probably still
does. Maybe not nicely graphical, but it'd bypass the perceived need to
press [Ctrl]+[Alt]+[Delete].

Michael Bednarek

unread,
Jan 6, 2007, 8:30:27 AM1/6/07
to

I think it still exists and is called SETPASS. There used to be a
similar program for Windows which provided a GUI for those who found
Ctrl+Alt+Del too difficult to change the password, but I can't find it
anymore.

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"

Holger Petersen

unread,
Jan 6, 2007, 3:59:07 PM1/6/07
to
"Harlan Grove" <hrl...@aol.com> writes:

>topher wrote...

>> This requires hitting
>>CTRL-ALT-DEL.
>...


>there's no way to simulate pressing [Ctrl]+[Alt]+[Delete].

There must be some way: PC-Anywhre can do it!
But I am only a User of that program.

SCNR, Holger

Alan Adams

unread,
Jan 6, 2007, 9:45:42 PM1/6/07
to
Holger Petersen <h...@kbbs.org> wrote:

> >there's no way to simulate pressing [Ctrl]+[Alt]+[Delete].
>
> There must be some way: PC-Anywhre can do it!
> But I am only a User of that program.

For what it's worth, pcAnywhere provides their own GINA (AWGINA.DLL)
for Windows, which can thereby tell WINLOGON to proceed /as though/
CTRL-ALT-DEL has been pressed, even though CTRL-ALT-DEL sequence
hasn't physically or logically been pressed. (Using the WlxSasNotify
function WINLOGON shares with GINAs running in its process space.)

So you're right "its possible", but in a fashion no more useful to
script writers than saying "you can write your own keyboard driver to
simulate the event". For intents and purposes, its not possible to
cause this type of action from a script, and that's exactly the way
Windows wanted it to be.

Alan Adams

Michael Bednarek

unread,
Jan 7, 2007, 2:37:26 AM1/7/07
to
On Sat, 6 Jan 2007 20:59:07 +0000 (UTC), Holger Petersen wrote in
alt.msdos.batch.nt:

>"Harlan Grove" writes:
>
>>topher wrote...
>
>>> This requires hitting
>>>CTRL-ALT-DEL.
>>...
>
>
>>there's no way to simulate pressing [Ctrl]+[Alt]+[Delete].
>
>There must be some way: PC-Anywhre can do it!
>But I am only a User of that program.

So can VNC.

Mark V

unread,
Jan 7, 2007, 5:21:17 AM1/7/07
to
In alt.msdos.batch.nt Michael Bednarek wrote:

> On Sat, 6 Jan 2007 20:59:07 +0000 (UTC), Holger Petersen wrote in
> alt.msdos.batch.nt:
>
>>"Harlan Grove" writes:
>>
>>>topher wrote...
>>
>>>> This requires hitting
>>>>CTRL-ALT-DEL.
>>>...

>>>there's no way to simulate pressing [Ctrl]+[Alt]+[Delete].
>>
>>There must be some way: PC-Anywhre can do it!
>>But I am only a User of that program.
>
> So can VNC.

But in a very obscure and indirect way that involves installing
"hooks" and addressing the hidden secure desktop...

OP should forget simulating CTRL+ALT+DEL on Windows and address the
problem (setting a password) via other, more direct means IMHO.

Or build a robotic key presser device. <G>

Eric Bloch

unread,
Jan 7, 2007, 10:08:15 PM1/7/07
to
Look at PTFBPro at http://www.ptfbpro.com/

"Mark V" <notv...@invalid.nul> wrote in message
news:Xns98B13678A1...@comcast.dca.giganews.com...

Phil Robyn

unread,
Jan 8, 2007, 12:44:38 AM1/8/07
to
Eric Bloch wrote:
> Look at PTFBPro at http://www.ptfbpro.com/

I like AutoIt better, and it's *FREE*. :-)

http://www.hiddensoft.com/autoit3/


--
Phil Robyn
University of California, Berkeley

Mark V

unread,
Jan 8, 2007, 7:49:21 AM1/8/07
to
In alt.msdos.batch.nt Eric Bloch wrote:

> "Mark V" <notv...@invalid.nul> wrote in message
> news:Xns98B13678A1...@comcast.dca.giganews.com...
>> In alt.msdos.batch.nt Michael Bednarek wrote:
>>> On Sat, 6 Jan 2007 20:59:07 +0000 (UTC), Holger Petersen wrote

>>>>"Harlan Grove" writes:
>>>>>topher wrote...

>>>>>> This requires hitting
>>>>>>CTRL-ALT-DEL.
>>>>>...
>>
>>>>>there's no way to simulate pressing [Ctrl]+[Alt]+[Delete].
>>>>
>>>>There must be some way: PC-Anywhre can do it!
>>>>But I am only a User of that program.
>>>
>>> So can VNC.
>>
>> But in a very obscure and indirect way that involves installing
>> "hooks" and addressing the hidden secure desktop...
>>
>> OP should forget simulating CTRL+ALT+DEL on Windows and address
>> the problem (setting a password) via other, more direct means
>> IMHO.
>>
>> Or build a robotic key presser device. <G>

> Look at PTFBPro at http://www.ptfbpro.com/

Why? Can it force a keyboard hardware interrupt on CTRL+ALT+DEL?
<G>

(Phil)
I too like AutoIt3 here, but again, the Send() (keys) of
CTRL+ALT+DEL simply cannot be emulated in software (as opposed to a
physical keyboard) without hooking into the lower level parts of
Windows or replacing the GINA.

I'd love to be proved wrong. :)

Microsoft selected CTRL+ALT+DEL for it's Windows "Secure Attention
Signal" (SAS) for exactly this reason.

Fortunately there are other ways and APIs for resolving most issues
that would require a GUI response to CTRL+ALT+DEL.

pspasswd.exe (Sysinternals) might be one, if it were not for the
OP's requirement regarding Netware passwords. Fortunately others
have posted a solution for that I believe.

Phil Robyn

unread,
Jan 8, 2007, 10:21:16 AM1/8/07
to

Hi, Mark, right you are about CTRL+ALT+DEL ... I guess my point was that
for anything that PTFBPro (not free) can do, I would prefer using AutoIt
(free). I didn't mean to imply that AutoIt could send CTRL+ALT+DEL.
Sorry if I gave the wrong impression. :-)

>
> I'd love to be proved wrong. :)
>
> Microsoft selected CTRL+ALT+DEL for it's Windows "Secure Attention
> Signal" (SAS) for exactly this reason.
>
> Fortunately there are other ways and APIs for resolving most issues
> that would require a GUI response to CTRL+ALT+DEL.

Wholeheartedly agree. And something like AutoIT is a great addition
to one's box of tools for rendering creative solutions.

>
> pspasswd.exe (Sysinternals) might be one, if it were not for the
> OP's requirement regarding Netware passwords. Fortunately others
> have posted a solution for that I believe.

Mark V

unread,
Jan 8, 2007, 1:08:07 PM1/8/07
to
In alt.msdos.batch.nt Phil Robyn wrote:

> Mark V wrote:
>> In alt.msdos.batch.nt Eric Bloch wrote:

[ heavily snipped ]



>>> Look at PTFBPro at http://www.ptfbpro.com/
>>
>> Why? Can it force a keyboard hardware interrupt on
>> CTRL+ALT+DEL? <G>
>>
>> (Phil)
>> I too like AutoIt3 here, but again, the Send() (keys) of
>> CTRL+ALT+DEL simply cannot be emulated in software (as opposed
>> to a physical keyboard) without hooking into the lower level
>> parts of Windows or replacing the GINA.
>
> Hi, Mark, right you are about CTRL+ALT+DEL ... I guess my point
> was that for anything that PTFBPro (not free) can do, I would
> prefer using AutoIt (free). I didn't mean to imply that AutoIt
> could send CTRL+ALT+DEL. Sorry if I gave the wrong impression.
> :-)

You didn't! <G> I was killing two posts with a single stone and
*I* gave the wrong impression. LOL
I wish I had more time to "play" with AutoIt3 as I am and have been
very impressed with it over the years.

[ ]


>> Fortunately there are other ways and APIs for resolving most
>> issues that would require a GUI response to CTRL+ALT+DEL.
>
> Wholeheartedly agree. And something like AutoIT is a great
> addition to one's box of tools for rendering creative solutions.

[ ]

Absolutely agree! Well worth investigating. Especially perhaps
for batchers wanting "more". AutoIt3 is a very capable Win32
solution and well worth learning if one does not otherwise need any
cross-platform compatibility.

(musing: I wonder if it works under WINE?)

Now, if the OP would just have the courtesy of returning to
"close" or continue his thread... :)

ATB

0 new messages