[wpkg-users] Run script in elevated mode

Daniel Dehennin daniel.dehennin at ac-caen.fr
Fri Mar 12 12:55:44 CET 2010


Daniel Dehennin <daniel.dehennin at ac-caen.fr> writes:

Hello,

To conclude my thread (maybe someone will be interested):

> It seems finally that I need to open a new connection in the elevated
> sub-command.

[...]

> So I can not run my cmd scripts from a network share, great :-/

[...]


I find a solution, well a workaround, I run the following command:

cscript /Nologo execute-elevated.js %ComSpec% /c "net use \\myserver && %0 %*"

This open a cmd window, I need to type a login and a password and my
script is ran with elevated rights, this simplify a lot the setup of a win7:

1. fresh install of win7
2. connect with local user
3. open a connection to the server (with network login/pass)
4. double clic on the installation script (integration + WPKG installation + stuffs)
5. confirm UAC
6. type the login/pass to open a new connection to the server
7. let the script to the job

Set 5 and 6 are added by win7 compared to winXP.

One question remains, how can a script test if it's running with
elevated rights?

Regards.
-- 
Daniel Dehennin
RAIP de l'Orne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20100312/7b27c27a/attachment-0001.sig>


More information about the wpkg-users mailing list