Show Desktop

In Windows 10 the show desktop icon was replaced by a thin invisible line on the far right of the task bar.
To create a Windows 7 style "show desktop icon" instead follow the steps outlined below:

1.) Open up notepad (Start Menu > notepad)
Enter the code below and save the file as "Show Desktop.scf"

[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop


How to change the product key

Open command prompt (cmd) and run the following replacing the inpkey with the new product key.
cscript "c:\Program Files (x86)\Microsoft Office\Office15\ospp.vbs" /inpkey:YT000-YM000-JH000-YW000-Q9000


Remove Domain Policies

This is helpful is a PC has left a domain but still has policies being applied.

Backup your registry.
Delete the HKLM\Software\Policies\Microsoft Key (looks like a folder).
Delete the HKCU\Software\Policies\Microsoft Key.
Delete the HKCU\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects Key.
Delete the HKCU\Software\Microsoft\Windows\CurrentVersion\Policiess Key.


Add Take Ownership Menu

Open Notepad (Start Menu > notepad) and type the below code into it.
Save the file with a .reg extension and then double click it to run the command.

[HKEY_CLASSES_ROOT*\shell\runas] @="Take ownership" "HasLUAShield"="" "NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT*\shell\runas\command] @="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F" "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\Directory\shell\runas] @="Take ownership" "HasLUAShield"="" "NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command] @="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"


Force Read Priviliages

Navigate to the containing directory of the folder you want to edit in CMD. cd C:\inetpub\wwwroot\ then type command: icacls trickyfolder /grant:r "Administrators":(OI)(CI)M

Pro Tip: - If Icacls isn't a recognized command. (check you typed it correctly first)

Open Windows explorer (Start Menu > explorer). Right-click "My Computer" & select "Properties."

Click "Advanced/Advanced System Settings" tab. Click "Environment Variables" button. In the "System variables" box, scroll down to "PATH" and highlight it. Click the "Edit" button. In the "Variable value:" box, add to the very beginning of the text "C:\WINDOWS\system32;" without my quotation marks. (replace system32 with system depending on the location of icacls) Make sure you include the semicolon. Click OK three times.


Auto Login on Boot

This function is built into Windows and can be turned on by editing the registry.

Open Regedit (Start Menu > Regedit)
Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
Add or edit the following strings.

DefaultUserName REG_SZ Username
DefaultPassword REG_SZ Password

If these are not present enter the below strings

AutoAdminLogin REG_SZ 1
DefaultUserName REG_SZ Username
DefaultPassword REG_SZ Password

*add (DefaultDomain REG_SZ Domain) if the pc is on a domain


Auto Run a Command on Boot

You need to create 3 files to accomplish this.
*open notepad.exe enter code and "save as" .bat or .vbs to create files

  • 1.) a .bat file containing the command.
  • 2.) a .vbs file to auto run the .bat file
  • 3.) a shortcut to the .vbs file located in the windows startup folder.
  • DOS Batch File Examples: (filename.bat)
  • Example 1:
    cd C:\inetpub\wwwroot\node\server
    node server.js

    Example 2:
    cd c:\inetpub\wwwroot\KiwiIRC
    kiwi start

  • Virtual Basic Script Example (filename.vbs)
  • Set oShell = CreateObject ("Wscript.Shell")
    Dim strArgs
    strArgs = "cmd /c nodestart.bat"
    oShell.Run strArgs, 0, false
    *replace "nodestart" with the name of your batch file.

  • Shortcut Directions (Shortcut file)
  • Right click your filename.vbs file and select "Create Shortcut".
    Open a new instance of Windows Explorer (Start Menu > Explorer)
    Navigate to: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
    Click and drag your filename.vbs - shortcut file into the startup folder.


    Auto Start Service on Boot

    Open file explorer and navigate to or create C:\autoboot Open notepad and type a command, for example: cd C:\inetpub\wwwroot\server node server.js or cd c:\inetpub\wwwroot\KiwiIRC kiwi start then save the file as filename.bat then open a blank notepad and type

    Set oShell = CreateObject ("Wscript.Shell")
    Dim strArgs
    strArgs = "cmd /c filename.bat"
    oShell.Run strArgs, 0, false

    then save the file as filename.vbs close notepad and navigate to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup create a shortcut to C:\autoboot\filename.vbs


    Restart Service Script

    Run services.msc and select the service you want to restart. Right-click properties and take note of the service name. Open notepade and type the following:

    @echo off
    NET STOP servicename
    timeout /t 5 /nobreak > NUL
    NET START servicename
    timeout /t 2 /nobreak > NUL
    save the file as a .bat and double click it to run.


    Fix Unrecognized Command

    For example if ipconfig is no longer recognized then check that the default command still works which is: windows\system32\ipconfig /all

    To fix this right click "My Computer" & select "Properties." > Click "Advanced" tab. >Click "Environment Variables" button. Then in the "System variables" box, scroll down to "PATH" and highlight it. Click the "Edit" button and in the "Variable value:" box, add this string to the very beginning of the text "C:\WINDOWS\system32;" without my quotation marks. Make sure you include the semicolon. Then click OK three times.

    That should of have done it to test open cmd, right-click and select "run as administrator", Type cd C:\ hit enter, Type ipconfig, hit enter.


    Manually disable Bitlocker

    Bitlocker Key Required Screen
    Disable Bitlocker on C: by accessing CMD via the loop.
    (Advanced Options > Troubleshooting > Advanced Options > Command Prompt) Once in CMD
    run the following commands where the string (68660-etc) is the Bitlocker Key
    Manage-bde -status C: and Manage-bde -unlock c: -rp 686600-000000-000000-000000-000000-000000-000000-000000 and Manage-bde -protectors -disable c:


    Add Driver to Boot Image

    Open command prompt (Start Menu > cmd or C:\windows\system32\cmd.exe)
    Type the following commands after renaming the directory paths and install.wim file to the ones on your system.

    dism /mount-wim /wimfile:C:\temp\test\sources\install.wim /index:1 /mountdir:C:\temp\test\random
    dism /image:C:\temp\test\random /add-driver /driver:C:\temp\test\sources\drives /recurse
    dism /unmount-wim /mountdir:c:\temp\test\random /commit


    To correct an MDT endless boot

    Hit F8 to open CMD
    Diskpart
    Sel dis 0
    Clean
    Exit
    Wpeutil reboot


    How to find a service tag on a LAN

    Run CMD (C:/windows/system32/cmd.exe)
    nsclookup "Name of PC" to find it's IP4
    wmic /node:10.0.0.0 /user:admin /password:creds bios get serialnumber