ok, as usual a couple hours of googling turned up the answer, or an answer,
so I thought I'd share it here in case anyone wants to tell me there's a
better way. the code is below.
I am having a problem though: the authorization dialog that UAC puts up,
which is normally activated, read by WE, and a sound alerting you to it is
also made, is not activating, and is not making the sound, until I alt-tab
around to find the window. when I do this, then and only then, the sound is
made and the window is read about needing my permision to continue. it's
acting like the window eyes script manager is somehow inhibiting part of
this process. so, if there's anything I'm doing to cause this, I'd
appreciate it if GW would tell me.
below is example code for running a command in elevated mode. the extra
quote marks around one parameter are because the file name contains a space,
so I have to pass in quotes around it. the key to this working is the
"verb" parameter, which is set to "runas", which causes vista to ask for
permision. I assume this will be ok in xp, but haven't yet tried it.
Chip
--------
option explicit
dim oShell
Set oShell = CreateObject("Shell.Application")
oShell.ShellExecute "regsvr32", " /s ""C:\Users\Chip
Orange\AppData\Roaming\GW
Micro\Window-Eyes\users\user0100\WMX_NMEAControl.ocx""", "", "runas"
speak "done!"
-----Original Message-----
From: Chip Orange [mailto:[email protected]]
Sent: Saturday, December 26, 2009 2:05 PM
To: [email protected]
Subject: running an elevated command under vista
Hi all,
I have an .ocx file which I need to register as part of a script
installation process.
under vista, the only way I have found to successfully register it is to run
a cmd prompt as administrator, and then I can run the regsvr32 command to
register it.
does anyone know how I could do this from a script?
thanks.
Chip