cmd.exe with administrator privileges [message #608836] |
Tue, 25 February 2014 06:18 |
John Watson
Messages: 8962 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
This is perhaps out of scope, if anyone objects please say so.
I'm developing a configuration tool for the database and ASM, releases 11.2 and 12.1. The problem I'm hitting is that I need to do some things with Windows Administrator privileges, such as running the asmtool.exe or the net start utility. I really don't care whether I invoke these directly, or through a shell script, or by launching a cmd.exe shell.
But I cannot find a way to do this. Googling around for days and trying Windows support sites just comes up with variations on "right-click the file and choose 'run as administrator' " which is not a lot of use when invoking stuff through batch files or dbms_scheduler. The runas.exe utility lets you switch user, but does not seem to enable administrator privileges.
Any ideas? A commandline mechanism for gaining what Windows calls "elevated privileges" so that I can run asmtool.exe?
All insight gratefully received.
|
|
|
|
Re: cmd.exe with administrator privileges [message #608839 is a reply to message #608837] |
Tue, 25 February 2014 06:34 |
John Watson
Messages: 8962 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Exactly - I need a way to get that privilege for, for example, a script invoked through the Scheduler (and yes, I have run the Scheduler job with credentials for an administrator user, but that doesn't give the elevated privilege).
|
|
|
|
|
Re: cmd.exe with administrator privileges [message #608845 is a reply to message #608840] |
Tue, 25 February 2014 07:16 |
John Watson
Messages: 8962 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Thank you for that, it works: after a bit of hacking, I can run the asmtool.exe successfully through that PowerShell command. Now I have to work out why it works, so I can configure it for myself.
How come I spend days on Microsoft sites and get nowhere, then get a pointer to the answer in minutes on OraFAQ? Perhaps we should all set up as Windows consultants.
Thank you again.
|
|
|