Requested registry access is not allowed

app.manifest should be like this: <?xml version=”1.0″ encoding=”utf-8″?> <asmv1:assembly manifestVersion=”1.0″ xmlns=”urn:schemas-microsoft-com:asm.v1″ xmlns:asmv1=”urn:schemas-microsoft-com:asm.v1″ xmlns:asmv2=”urn:schemas-microsoft-com:asm.v2″ xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”> <assemblyIdentity version=”1.0.0.0″ name=”MyApplication.app” /> <trustInfo xmlns=”urn:schemas-microsoft-com:asm.v2″> <security> <requestedPrivileges xmlns=”urn:schemas-microsoft-com:asm.v3″> <requestedExecutionLevel level=”requireAdministrator” uiAccess=”false” /> </requestedPrivileges> </security> </trustInfo> </asmv1:assembly>

Windows is not passing command line arguments to Python programs executed from the shell

I think I solved this. For some reason there is a SECOND place in the registry (besides that shown by the file associations stored in HKEY_CLASSES_ROOT\Python.File\shell\open\command): [HKEY_CLASSES_ROOT\Applications\python.exe\shell\open\command] @=”\”C:\\Python25\\python.exe\” \”%1\” %*” This seems to be the controlling setting on my system. The registry setting above adds the “%*” to pass all arguments to python.exe (it was … Read more

OpenSubKey() returns null for a registry key that I can see in regedit.exe

A 32-bit application on a 64-bit OS will be looking at the HKLM\Software\Wow6432Node node by default. To read the 64-bit version of the key, you’ll need to specify the RegistryView: using (var hklm = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64)) using (var key = hklm.OpenSubKey(@”SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”)) { // key now points to the 64-bit key } The API to do … Read more

Add menu item to Windows context menu only for specific filetype

Identify the file type (ProgID) for .jpg files This can be done by checking the default value of HKEY_CLASSES_ROOT\.jpg. It could be anything based on what you’ve installed, but for the purposes of this example, we’ll call it jpegfile, a common default. Set the context menu item (verb) properties for that file type You can … Read more

Why are other folder paths also added to system PATH with SetX and not only the specified folder path?

Windows creates a copy of the entire environment table of the process starting a new process for the new process. Therefore on start of your C++ application, your application gets the environment table including PATH from parent process, Windows Explorer or in your case Visual Studio. And this PATH is copied for cmd.exe on start … Read more

Read/write to Windows registry using Java

I know this question is old, but it is the first search result on google to “java read/write to registry”. Recently I found this amazing piece of code which: Can read/write to ANY part of the registry. DOES NOT USE JNI. DOES NOT USE ANY 3rd PARTY/EXTERNAL APPLICATIONS TO WORK. DOES NOT USE THE WINDOWS … Read more