Advanced Windows


  • 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 Add Take Ownership option in Context 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"


  • To correct an MDT endless boot

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


    auto start 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: 1.) 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 2.) 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 3.) - 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 log into windows on boot

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

    1.) Open Regedit (Start Menu > Regedit)

    2.) Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

    3.) Add or edit the following strings.

    AutoAdminLogin REG_SZ 1 DefaultUserName REG_SZ Username DefaultPassword REG_SZ Password

    *add (DefaultDomain REG_SZ Domain) if the pc is on a controlled network.

    That's it.


    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.


    fix a cmd that isnt recognized

    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.


    How to auto start services

    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


    How to restart services

    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.


    Add driver to windows 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




  • If you have questions feel welcome to contact me.