Python Forum

Full Version: [split] Could you please clarify where i did mistake also how run without admin right
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Could you please clarify where i did mistake also how run without admin right

import winreg as wreg
import webbrowser
def newregkey():
    key = wreg.CreateKey(wreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Silverlight")
    wreg.SetValue(key, 'NewSubkey','AllowElevatedTrustAppsInBrowser')
    wreg.SetValueEx(key, 'ValueName', 0, wreg.REG_DWORD, '00000001')
    key.Close()

    key = wreg.CreateKey(wreg.HKEY_LOCAL_MACHINE, "SOFTWARE\\WOW6432Node\\Microsoft\\Silverlight")
    wreg.SetValue(key, 'NewSubkey',  'AllowElevatedTrustAppsInBrowser')
    wreg.SetValueEx(key, 'ValueName', 0, wreg.REG_DWORD, '00000001')
    key.Close()

    iexplore = "C:\Program Files\Internet Explorer\iexplore.exe"

    webbrowser.get(iexplore).open_new_tab("https://heliwise.agustawestland.com/OnlineHelp/OnlineHelp.htm")
what error messages are you getting?
what's happening that makes you feel there is something wrong?
Please read: https://python-forum.io/misc.php?action=help&hid=19