How to manually register ClickOnce file associations after installation?

You can figure out the registry keys to be added, using Windows Sysinternals Process Monitor (Previously known as RegMon). Capture Events when you install your app using ClickOnce with default file associations. It will record all the registry operations (lots of them). You would need to use some filters to easily identify the registry keys.

Create registry entry to associate file extension with application in C++

Your basic overview of the process is found in this MSDN article. The key parts are at the bottom of the list: Register the ProgID A ProgID (essentially, the file type registry key) is what contains your important file type properties, such as icon, description, and context menu items including applications used when the file … Read more

How to remove git from menu context in Documents?

I Think I’ve found other reference about it. I’ve delete mine on HKEY_CLASSES_ROOT\LibraryFolder\background\shell Based on https://stackoverflow.com/a/32490883/4906348, Quite simple, I never think about it. You should see like this. From This To This. It works. Note For Windows 10, there may be also keys in HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell and/or HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\git_shell which you may have to delete as well.

Getting the Username from the HKEY_USERS values

If you look at either of the following keys: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\hivelist You can find a list of the SIDs there with various values, including where their “home paths” which includes their usernames. I’m not sure how dependable this is and I wouldn’t recommend messing about with this unless you’re really sure what you’re doing.

Comment in REG file

It’s enough to put semicolon before comment on the same line. In another words, semicolon before comment is supported by reg file on a line with registry entry as well as a full-line of comment. References Minus sign to delete, semicolon to comment and IF/ENDIF mentioned here: MSDN: Registry File (Compact 2013) (Archived here.)

Writing to registry in a C# application

First of all if you want to edit key under LocalMachine you must run your application under admin rights (better use CurrentUser it’s safer or create the key in installer). You have to open key in edit mode too (OpenSubKey method) to add new subkeys. I’ve checked the code and it works. Here is the … Read more

Test if registry value exists

Personally, I do not like test functions having a chance of spitting out errors, so here is what I would do. This function also doubles as a filter that you can use to filter a list of registry keys to only keep the ones that have a certain key. Function Test-RegistryValue { param( [Alias(“PSPath”)] [Parameter(Position … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)