Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to write to registry without admin rights on win vista/7

467 views
Skip to first unread message

miamia

unread,
Jun 24, 2011, 4:08:55 AM6/24/11
to
Hello,

In my program I can set to run after system startup (it writes path to
Software\Microsoft\Windows\CurrentVersion\Run) but when normal user is
logged in my application crashes. I must right click on app an choose
"Run As Admin" and then everything works.

How can I do it to write to registry without "Run As Admin" ?

Duncan Booth

unread,
Jun 24, 2011, 4:48:19 AM6/24/11
to

Andrew Berg

unread,
Jun 24, 2011, 3:02:54 PM6/24/11
to comp.lang.python
On 2011.06.24 03:48 AM, Duncan Booth wrote:
> http://stackoverflow.com/questions/130763/request-uac-elevation-from-within-a-python-script
Heh. On Windows 7, using 'runas' for the operation in os.startfile()
gives me a normal UAC prompt.

Is there any way to ask for elevation from a subprocess.Popen() call?
Launching an application that normally asks for elevation automatically
fails with error 740 - 'The requested operation requires elevation'. The
runas utility needs an explicit username.

Andrew Berg

unread,
Jun 24, 2011, 8:20:00 PM6/24/11
to comp.lang.python
On 2011.06.24 03:48 AM, Duncan Booth wrote:
> http://stackoverflow.com/questions/130763/request-uac-elevation-from-within-a-python-script
Heh. On Windows 7, using 'runas' for the operation in os.startfile()
gives me a normal UAC prompt.

Is there any way to ask for elevation from a subprocess.Popen() call?

Launching an application that normally automatically asks for elevation

Message has been deleted

Thorsten Kampe

unread,
Jun 25, 2011, 1:48:09 AM6/25/11
to
* miamia (Fri, 24 Jun 2011 01:08:55 -0700 (PDT))

> In my program I can set to run after system startup (it writes path to
> Software\Microsoft\Windows\CurrentVersion\Run)

Under HKLM oder HKCU? The path itself is of course irrelevant.

> but when normal user is logged in my application crashes.

Without an exception?

> I must right click on app an choose "Run As Admin" and then everything
> works.
>
> How can I do it to write to registry without "Run As Admin" ?

Disable UAC.

Thorsten

Thorsten Kampe

unread,
Jun 25, 2011, 2:03:28 AM6/25/11
to
* Andrew Berg (Fri, 24 Jun 2011 14:02:54 -0500)

> On 2011.06.24 03:48 AM, Duncan Booth wrote:
> > http://stackoverflow.com/questions/130763/request-uac-elevation-from-within-a-python-script
> Heh. On Windows 7, using 'runas' for the operation in os.startfile()
> gives me a normal UAC prompt.

That is because UAC for non-admin accounts /is/ runas.

Thorsten

0 new messages