Add the following registry hack to get a "Take Ownership" context menu item:
Windows Registry Editor Version 5.00
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
Convert document to UTF8 using PowerShell
Get-Content 'file-name' | Out-File 'file-name' -Encoding UTF8
Install features using PowerShell
- Open a Windows PowerShell session with elevated user rights. To do this, click Start, click All Programs, click Accessories, click Windows PowerShell, right-click the Windows PowerShell shortcut, and then click Run as administrator.
- Load the Server Manager module into the Windows PowerShell session before working with Server Manager cmdlets. Type the following, and then press Enter:
- If you do not know the command name of the role, role service, or feature that you want to install, type the following, and then press Enter to return a list of all command names in the Name column. The command name is required for the next step.
- Type the following, in which name represents the command name of the role, role service, or feature that was obtained in the previous step, and then press Enter to install a role or feature. The -restart parameter restarts the computer automatically after installation is complete, if a restart of the computer is required by the role or feature.
Add-WindowsFeature name -restart
- You can install multiple roles, role services, and features by using commas to separate the command names, as shown in the following example.
Install named feature from .msi
msiexec /i package.msi /l*v log.log ADDLOCAL=Minimal
Uninstall product by product code
get-wmiobject Win32_Product | Format-Table IdentifyingNumber, Name, LocalPackage
... then use the product-code-guid in the statement below ...
msiexec /x product-code-guid
Tray Icon Programs
- Create a Windows Forms Application
- Add a ContextMenuStrip
- Add some entries to the context menu strip, double click on them to get the handlers e.g. exit (double click) -> handler -> Close()
- Add a NotifyIcon, in the designer set contextMenuStrip to the one you just created, set an icon
- Set properties for the form in the designer:
Visible = false at the end of
Form1_Load, this will hide the icon when using ctrl+tab
Tray Icon: 16x16, 20x20, 24x24
App Icon: 16x16, 24x24, 32x32, 48x48, 64x64, 96x96, 128x128, 192x192, 256x256
Allow RDP Connections on Windows 8.1+
- alt + X, select Run
- SystemPropertiesRemote.exe + enter
- Deselect Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended)
Using shell: shortcuts
- Alt + x, select run
shell:sendto to open the Send To folder
Ubuntu filesystem location (WSL)
The Ubuntu system files are stored at:
Your Ubuntu user account's home folder is stored at:
The root account's home folder is stored at:
Smooth fonts in Google Chrome
- Type chrome://flags in the address bar + enter
- Scroll down to (or search for) LCD text antialiasing
- Set to Enabled
- Relaunch Chrome
Export printer to RDP server host
The printer on the client needs to be marked as shared and in your RDP you need to enable printer sharing.
- Open RegEdit
- Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\Windows x64\Drivers (assuming 64 bits systems here)
- Lookup the InfPath for the printer in Version-3 or Version-4.
- Copy all files (and .inf file) to a folder somewhere on your RDP server host, ex. c:\PrinterDrivers\MyPrinter.
On RDP server host:
- Run printui /s /t 2.
- Click Add → Have Disk, browse to c:\Printers\Myprinters (as step 4 above).
- Install drivers.
The next time you connect to the RDP server host you should be able to print to your local printer from the RDP server host.