I am having problems with setting focus on a PGP decryption dialog box.
My code below works fine interactively on the client PC. However, it
does not set the focus when I schedule the VBScript on the server. I
would greatly appreciate any suggestion. Thank you.

'Process PGP decryption of GM/Fidelity enrollment file
Wscript.Sleep 9000 'Pause 9 seconds
PGP = WshShell.Run ("M:\ohw06027.elg.pgp")

'Send keystrokes to PGP active window
WScript.Sleep 6000 'Pause 6 seconds
WshShell.SendKeys "999999" 'Send passphrase keystrokes

Re: Setting focus by Torgeir

Torgeir
Tue Jan 25 13:10:38 CST 2005

htran wrote:

> I am having problems with setting focus on a PGP decryption dialog box.
> My code below works fine interactively on the client PC. However, it
> does not set the focus when I schedule the VBScript on the server. I
> would greatly appreciate any suggestion. Thank you.
Hi

When scheduled, will the script run behind a screen saver or
a "Computer Locked" screen, or at the logon prompt?

If so, you can forget about SendKeys...


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx

Re: Setting focus by htran

htran
Tue Jan 25 16:34:49 CST 2005

Torgeir,

The scheduled script does run behing a "Computer Locked" screen. And,
it appears that the PGP dialog box is not getting the focus. Do you
have any suggestions on other options using VBScript? I have read from
this newsgroup to try using AutoIt in conjunction with VBScript.
Please let me know. Thanks again.

Torgeir Bakken (MVP) wrote:
> htran wrote:
>
> > I am having problems with setting focus on a PGP decryption dialog
box.
> > My code below works fine interactively on the client PC. However,
it
> > does not set the focus when I schedule the VBScript on the server.
I
> > would greatly appreciate any suggestion. Thank you.
> Hi
>
> When scheduled, will the script run behind a screen saver or
> a "Computer Locked" screen, or at the logon prompt?
>
> If so, you can forget about SendKeys...
>
>
> --
> torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
> Administration scripting examples and an ONLINE version of
> the 1328 page Scripting Guide:
> http://www.microsoft.com/technet/scriptcenter/default.mspx