I have seen a couple commercial apps which can do it, so there must be a
way.
- tex
Disable the screen saver!
If you need some program to execute at a specific time, even if the
machine is locked, use the Task Scheduler. It does not care about
the locked/unlocked status.
I don't see that as a viable answer - it's not even possible in most
cases since screen saver settings are in the user profile and it's not
the logged in user who needs to break the lock.
T.E.D. (tda...@gearbox.maem.umr.edu)
SPAM filter: Messages to this address *must* contain "T.E.D."
somewhere in the body or they will be automatically rejected.
Do they perhaps replace or chain the GINA?
Perhaps I should have given a better explanation. I need to run a scheduled
application which sends keypresses to another running application. It works
fine when the screen is not locked, but fails when the screen is locked.
Of course, you are right, it would be easiest to not lock the screen the
screen at all. However given that it's a server we don't like to keep the
console freely exposed. Certain applications must run at the console and
cannot simply run as a service, unfortunately and so we have to keep the
screen locked from prying hands/eyes.
> If you need some program to execute at a specific time, even if the
> machine is locked, use the Task Scheduler. It does not care about
> the locked/unlocked status.
Unfortunately, it's not that simple, as explained above.
- tex
Hi Tex,
I never had the need for this. My idea: What happens when you
kill the screen saver process?
best regards,
Reinhardt
--
Die finnische Regierung laesst zum wiederholten Male mitteilen,
dass alte Lappen nicht bedenkenlos weggeworfen werden sollten.
That's a good question...but I doubt that it does this, no reboot required
on install.
See: http://www.splinterware.com/products/wincron.htm
The free version unfortunately lacks the unlock feature. $30 isn't very
much money, but I will need to do this on many machines so it will add up.
I installed the professional version and it appears to use a service to do
it's work. I tried simply running it in console mode and it couldn't unlock
the pc. Switching to service mode allowed it to do the unlock "magic".
- tex
I'm not sure what process is running the screen saver, however I think even
if you did kill it, windows will still drop back to the logon screen.
- tex
There might be a work around - if the apps you need to run are console
apps and meet some other constraints, you might be able to run them
remotely on the server with PsExec.
psexec \\machine_name cmd
gets you a cmd prompt that runs on the remote machine but has its user
interface on your desktop. It can accept a username and prompt for a
password.
--
T.E.D. (tda...@gearbox.maem.umr.edu)
So, if I understand this you have a user-interactive GUI application
running on a server console that
May/will need "user keystokes" entered into it during operation.
(or possibly at scheduled execution time)
Have a SS running and locked
Have no inherent ability to avoid entering keystrokes interactively
by way of starting the application with such as "/silent" or similar
or feed it arguments on the initial command line.
Cannot have the applications re-written.
Cannot run the application on another machine.
The requirement is one of
Lower the locked SS programmatically.
SendKeys() while the SS is active.
Not that I have any immediate answer but does above describe the
situation?
I am wondering it AutoIt v3 might help?
http://www.hiddensoft.com/autoit3
"Directly get information on and interact with edit boxes, check
boxes, list boxes, combos, buttons, status bars without the risk of
keystrokes getting lost. Even work with controls in windows that
aren't active!"
General process to accomplish what I'm trying to do:
1) unlock screen
2) sendkeys
3) relock screen
The only problematic/tough part is getting the screen to unlock
programmatically.
> Not that I have any immediate answer but does above describe the
> situation?
Yes. Note: The running app itself does have keyboard macro level
functionality to do what i need it to do, but b/c it too is keyboard based,
it suffers from the same problem, ie, that the screen saver/screen lock
prevents it from receiving the keystrokes.
Unfortunately, it's a commercial app so it's functionality cannot be
modified in house.
SendKeys does not work with screen locked. As I understand it, the
CTRL-ALT-DEL used to initiate the screen unlock process works at the
hardware interrupt level.
- tex
>"Reinhardt Kern" <Reinhar...@gmx.de> wrote in message
>news:krjnp0lhboi9q8bln...@4ax.com...
>> "Tex" <t...@aspam101.org> wrote:
>>
>>>Is there a way to automatically unlock a workstation? I'm familiar with
>>>the
>>>rundll32 user32.dll LockWorkStation command to lock a workstation.
>>>However,
>>>there appears to be no reverse function.
>>>
>>>I have seen a couple commercial apps which can do it, so there must be a
>>>way.
>>>
>> I never had the need for this. My idea: What happens when you
>> kill the screen saver process?
>
>I'm not sure what process is running the screen saver, however I think even
>if you did kill it, windows will still drop back to the logon screen.
>
Hi Tex,
use "tasklist >file.txt" to get a list of processes.
The name of the screensaver process should be named as the result
of
reg query "HKEY_CURRENT_USER\Control Panel\Desktop" | find
"SCRNSAVE.EXE"
Compared with screen locked and unlocked...only ntvdm.exe appeared. Not a
process I want to kill.
> The name of the screensaver process should be named as the result
> of
>
> reg query "HKEY_CURRENT_USER\Control Panel\Desktop" | find
> "SCRNSAVE.EXE"
No luck here. Not in registry.
- tex
> "Mark V" <notv...@nul.invalid> wrote in message
> news:Xns95A53AD987...@216.77.188.18...
>> In alt.msdos.batch.nt Tex wrote:
>>
>> So, if I understand this you have a user-interactive GUI
>> application running on a server console that
>> May/will need "user keystokes" entered into it during operation.
>> (or possibly at scheduled execution time)
>> Have a SS running and locked
>> Have no inherent ability to avoid entering keystrokes
>> interactively by way of starting the application with such as
>> "/silent" or similar or feed it arguments on the initial command
>> line. Cannot have the applications re-written.
>> Cannot run the application on another machine.
>>
>> The requirement is one of
>> Lower the locked SS programmatically.
>> SendKeys() while the SS is active.
>
> General process to accomplish what I'm trying to do:
>
> 1) unlock screen
> 2) sendkeys
> 3) relock screen
>
> The only problematic/tough part is getting the screen to unlock
> programmatically.
Unless (maybe) you can send messages directly to the application's
windows controls (and not SendKeys() per se) while the SS is raised
(and locked). _Possibly_ AutoIt3 can do that. I do not know though
as I last used version 2. Depending on schedule here I can look into
it within a few days I think.
>
>> Not that I have any immediate answer but does above describe the
>> situation?
>
> Yes. Note: The running app itself does have keyboard macro level
> functionality to do what i need it to do, but b/c it too is
> keyboard based, it suffers from the same problem, ie, that the
> screen saver/screen lock prevents it from receiving the
> keystrokes.
>
> Unfortunately, it's a commercial app so it's functionality cannot
> be modified in house.
>
> SendKeys does not work with screen locked. As I understand it,
> the CTRL-ALT-DEL used to initiate the screen unlock process works
> at the hardware interrupt level.
We are back to MSGINA for the SAS (secure attention signal aka C-A-D)
handling which to my current understanding cannot be bypassed.
Not sure. Per your suggestion, I had checked the AutoIT's forums and found
that users had indicated that they were unable to get it to unlock locked
screens.
As a further follow up note, I did some further investigation and found the
following:
http://www.codeproject.com/system/alt_control_delete.asp
He has a sample app which I managed to get running...it worked. ie, I got
it to successfully send a C-A-D to the locked screen window. I had to
initiate it as a system service (using a service making tool i have). I
think it works by running as the LocalSystem account.
- tex
For clarification...it worked only insofar as it sent a C-A-D to the screen
(thus presenting the login prompt)...it does _not_ actually take the next
step of entering the password and then hitting enter.
I unfortunately don't know C++ so his source code isn't of much use to me.
- tex
> "Mark V" <notv...@nul.invalid> wrote in message
> news:Xns95A5A99709...@216.77.188.18...
>> In alt.msdos.batch.nt Tex wrote:
>>
>>> "Mark V" <notv...@nul.invalid> wrote in message
>>> news:Xns95A53AD987...@216.77.188.18...
>>>> In alt.msdos.batch.nt Tex wrote:
>>>>
>> Unless (maybe) you can send messages directly to the
>> application's windows controls (and not SendKeys() per se) while
>> the SS is raised (and locked). _Possibly_ AutoIt3 can do that.
[ ]
> Not sure. Per your suggestion, I had checked the AutoIT's forums
> and found that users had indicated that they were unable to get it
> to unlock locked screens.
I should have checked. Just did a simple trial and the SendKrys
limitation appears to apply to AutoIt3 as well. With a locked
winstation the actual keys were not sent until unlocking.
>
> As a further follow up note, I did some further investigation and
> found the following:
>
> http://www.codeproject.com/system/alt_control_delete.asp
>
> He has a sample app which I managed to get running...it worked.
> ie, I got it to successfully send a C-A-D to the locked screen
> window. I had to initiate it as a system service (using a service
> making tool i have). I think it works by running as the
> LocalSystem account.
Interesting. Thanks for mentioning it.
Tex, FWIW I bounced this off some people elsewhere and they suggest
under the circumstances that the best approach would be to attempt to
send messages (not keystrokes) to the application even if the
workstation is locked. Rather dependent apparently though on the
specifics of your application. The suggestion was (in part) any
language that has access to the Win32 APIs such as SendMessage. VBS
might be a possibility.
Some suggested that AutoIt3 might be capable as it has several
(unfamiliar to me) "send*" functions that might work. A VB, VBS or
other programming forum might be worth a post. And assuming you have
no in-house programmers available.
Good luck.