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

Discussion in 'Python' started by miamia, Jun 24, 2011.

  1. miamia

    miamia Guest


    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" ?
    miamia, Jun 24, 2011
    1. Advertisements

  2. miamia

    Andrew Berg Guest

    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, Jun 24, 2011
    1. Advertisements

  3. miamia

    Andrew Berg Guest

    Andrew Berg, Jun 25, 2011
  4. 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:
    "WMPNSCFG"="C:\\Program Files\\Windows Media Player\\WMPNSCFG.exe"
    "H/PC Connection Agent"="\"C:\\Program Files\\Microsoft

    Or can you plant a script into the userprofile startup directory?
    Dennis Lee Bieber, Jun 25, 2011
  5. * miamia (Fri, 24 Jun 2011 01:08:55 -0700 (PDT))
    Under HKLM oder HKCU? The path itself is of course irrelevant.
    Without an exception?
    Disable UAC.

    Thorsten Kampe, Jun 25, 2011
  6. * Andrew Berg (Fri, 24 Jun 2011 14:02:54 -0500)
    That is because UAC for non-admin accounts /is/ runas.

    Thorsten Kampe, Jun 25, 2011
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.