From: Joseph Morales on
On Windows 2008 R2, a driver install is opening the prompt "Windows Security.
Would you like to install this device software? Name:.. Publisher:..
[Install] [Don't Install]. I'd like a VBScript to activate this window and
send an I keystroke to select the Install button. Instead, I find that
WshShell.AppActivate("Windows Security") always returns False. Abbreviating
the name to "Windows" or "Security" doesn't help.
On the other hand, I can activate Notepad by name. But I can't activate a
command prompt window with WshShell.AppActivate("Command Prompt") .
Is this a deliberate Windows 2008 security feature? Have they restricted the
targets for AppActivate to exclude the Command Prompt window and Security
prompt windows? Where is this documented? Is there any way to get around it?
Thanks.
--
Joseph
From: mayayana on
Doesn't that make sense if you have UAC enabled?
What you're trying to do involves permission issues.
I don't really use SendKeys, but I know there's been
a lot of trouble with it in VB with Vista/7.

Here's something that could be useful:

http://www.jsware.net/jsware/scripts.php5#jsaa

jsAA.dll. It's a component for using Active Accessibility
from script. With that you can access open windows and
walk the content, returning text in textboxes, captions
on buttons, etc. You can also auto-click a button.

I don't know if that will help your case. I assume you
want to automate an install on several servers, and jsAA
would need to be copied/registered on each before you
could use it. Also, if you're running up against UAC and
you don't want to disable UAC then you may just be out
of luck. The whole point of UAC is to block such things
unless you specifically allow them through a UAC prompt.
There's no sense locking yourself out of your own
house and then wondering why you can't get in. :)


> On Windows 2008 R2, a driver install is opening the prompt "Windows
Security.
> Would you like to install this device software? Name:.. Publisher:..
> [Install] [Don't Install]. I'd like a VBScript to activate this window and
> send an I keystroke to select the Install button. Instead, I find that
> WshShell.AppActivate("Windows Security") always returns False.
Abbreviating
> the name to "Windows" or "Security" doesn't help.
> On the other hand, I can activate Notepad by name. But I can't activate a
> command prompt window with WshShell.AppActivate("Command Prompt") .
> Is this a deliberate Windows 2008 security feature? Have they restricted
the
> targets for AppActivate to exclude the Command Prompt window and Security
> prompt windows? Where is this documented? Is there any way to get around
it?
> Thanks.
> --
> Joseph