Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8360 > unrolled thread

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

Started bymiamia <peterirbizon@gmail.com>
First post2011-06-24 01:08 -0700
Last post2011-06-25 07:48 +0200
Articles 7 — 5 participants

Back to article view | Back to comp.lang.python


Contents

  how to write to registry without admin rights on win vista/7 miamia <peterirbizon@gmail.com> - 2011-06-24 01:08 -0700
    Re: how to write to registry without admin rights on win vista/7 Duncan Booth <duncan.booth@invalid.invalid> - 2011-06-24 08:48 +0000
      Re: how to write to registry without admin rights on win vista/7 Andrew Berg <bahamutzero8825@gmail.com> - 2011-06-24 14:02 -0500
        Re: how to write to registry without admin rights on win vista/7 Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-06-25 08:03 +0200
      Re: how to write to registry without admin rights on win vista/7 Andrew Berg <bahamutzero8825@gmail.com> - 2011-06-24 19:20 -0500
    Re: how to write to registry without admin rights on win vista/7 Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-06-24 22:06 -0700
    Re: how to write to registry without admin rights on win vista/7 Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-06-25 07:48 +0200

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

Frommiamia <peterirbizon@gmail.com>
Date2011-06-24 01:08 -0700
Subjecthow to write to registry without admin rights on win vista/7
Message-ID<321efdbf-e2e7-44db-90f2-60d784b6e5c1@d1g2000yqm.googlegroups.com>
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" ?

[toc] | [next] | [standalone]


#8362

FromDuncan Booth <duncan.booth@invalid.invalid>
Date2011-06-24 08:48 +0000
Message-ID<Xns9F0E63BB8A350duncanbooth@127.0.0.1>
In reply to#8360
miamia <peterirbizon@gmail.com> wrote:

> 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" ?

This might give you some pointers:

http://stackoverflow.com/questions/130763/request-uac-elevation-from-within-a-python-script


-- 
Duncan Booth http://kupuguy.blogspot.com

[toc] | [prev] | [next] | [standalone]


#8395

FromAndrew Berg <bahamutzero8825@gmail.com>
Date2011-06-24 14:02 -0500
Message-ID<mailman.378.1308942191.1164.python-list@python.org>
In reply to#8362
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.

[toc] | [prev] | [next] | [standalone]


#8436

FromThorsten Kampe <thorsten@thorstenkampe.de>
Date2011-06-25 08:03 +0200
Message-ID<MPG.286f988b4b60eab989824@news.individual.de>
In reply to#8395
* 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

[toc] | [prev] | [next] | [standalone]


#8418

FromAndrew Berg <bahamutzero8825@gmail.com>
Date2011-06-24 19:20 -0500
Message-ID<mailman.396.1308957608.1164.python-list@python.org>
In reply to#8362
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
fails with error 740 - 'The requested operation requires elevation'.

[toc] | [prev] | [next] | [standalone]


#8434

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2011-06-24 22:06 -0700
Message-ID<mailman.403.1308978380.1164.python-list@python.org>
In reply to#8360
On Fri, 24 Jun 2011 01:08:55 -0700 (PDT), miamia
<peterirbizon@gmail.com> declaimed the following in
gmane.comp.python.general:

> 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" ?

	Forgive me -- I've not checked recently (I'm usually trying to kill
things that set up auto-run stuff)...

	Are there any equivalent registry entries in the /user/ hive rather
than the system hive? (Appears to be since I found this in regedt32:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"ctfmon.exe"="C:\\WINDOWS\\system32\\ctfmon.exe"
"AdobeBridge"=""
"WMPNSCFG"="C:\\Program Files\\Windows Media Player\\WMPNSCFG.exe"
"H/PC Connection Agent"="\"C:\\Program Files\\Microsoft
ActiveSync\\wcescomm.exe\""
)

	Or can you plant a script into the userprofile startup directory?
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
        wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#8435

FromThorsten Kampe <thorsten@thorstenkampe.de>
Date2011-06-25 07:48 +0200
Message-ID<MPG.286f9502aea7422e989823@news.individual.de>
In reply to#8360
* 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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web