1. Information

Delta Windows Tools provides several PowerShell modules that contain both functions and variables. It also provides an Aliases.txt file that contains macros for all the PowerShell functions and variables exported. During installation it adds C:\ProgramData\Delta Software Labs\Windows-Tools\Command.bat to the AutoRun value in the HKLM:\Software\Microsoft\Command Processor registry key. This makes the Command.bat file being executed when a Command Prompt (cmd.exe) is opened/started.

The Command.bat file does the following.

  • Installs the C:\ProgramData\Delta Software Labs\Windows-Tools\Aliases.txt file using the doskey.exe command.

  • Shows the Delta Windows Tools version.

  • Disables the Clink Ctrl+D key combination that would close the Command Prompt window.

  • Sets the prompt to the user name and computer name with the current drive and path.

  • Sets the prompt colors to bright white, bright green, bright blue and bright white.

  • Sets the working directory to the user’s home folder.

  • Use the doskey.exe /macros command to show all aliases/macros available in the Command Prompt.

  • Now it is possible to execute a PowerShell function by just typing its name.

2. Cleanup

Invoke-ComputerCleanup

3. Printers

Install-PrinterDrivers

# Add network printer connection.
rundll32 printui.dll PrintUIEntry /in /n "\\SMRU-SRV\Microbiology Office (BW) HP LaserJet Pro M404dn"

# Delete network printer connection.
rundll32 printui.dll PrintUIEntry /dn /n "\\SMRU-SRV\Microbiology Office (BW) HP LaserJet Pro M404dn"
rundll32 printui.dll PrintUIEntry /dn /n "\\SMRU-SRV\Photocopier Upstairs (Color) Fuji Xerox ApeosPort-V C5575"