When – and why – should you store data in the Windows Registry?

Originally (WIN3) configuration was stored in the WIN.INI file in the windows directory. Problem: WIN.INI grew too big. Solution (Win31): individual INI files in the same directory as the program. Problem: That program may be installed on a network and shared by many people. Solution(Win311): individual INI files in the user’s Window directory. Problem: Many … Read more

Command line to remove an environment variable from the OS level configuration

To remove the variable from the current environment (not permanently): set FOOBAR= To permanently remove the variable from the user environment (which is the default place setx puts it): REG delete HKCU\Environment /F /V FOOBAR If the variable is set in the system environment (e.g. if you originally set it with setx /M), as an … 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

How to export/import PuTTY sessions list?

Export cmd.exe, requires elevated prompt due to regedit: Only sessions (produces file putty-sessions.reg on the Desktop): regedit /e “%USERPROFILE%\Desktop\putty-sessions.reg” HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions All settings except ssh keys (produces file putty.reg on the Desktop): regedit /e “%USERPROFILE%\Desktop\putty.reg” HKEY_CURRENT_USER\Software\SimonTatham Powershell: Only sessions (produces file putty-sessions.reg on the Desktop): reg export HKCU\Software\SimonTatham\PuTTY\Sessions ([Environment]::GetFolderPath(“Desktop”) + “\putty-sessions.reg”) All settings except ssh keys … Read more

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