PrintUI (CMD)

Add and remove local printer and driver through the command line. Can be used in scripts or packages. Before adding the printer, setup port and restart the Print Spooler service.

rundll32 printui.dll PrintUIEntry /if /b "ETIAM Print-in" /f "%ProgramFiles%\Etiam\Print-In\Driver\Print-in.inf" /r "PrintIn Port" /m "ETIAM Print-in" /q
rundll32 printui.dll PrintUIEntry /Xs /n "ETIAM Print-in" comment "ETIAM virtual printer" location "http://www.etiam.com" /q
rundll32 printui.dll PrintUIEntry /dl /n "ETIAM Print-in" /q
rundll32 printui.dll PrintUIEntry /dd /m "ETIAM Print-in" /q

DIFxApp Configuration Flags (MSI)

Flag values for the DIFxApp merge module, to use in the MSIDriverPackages table when installing drivers in a MSI file. Remember to add the DIFxApp merge module, otherwise the driver will not be installed in the DriverStore.

This method is equivalent to DPinst.exe with a lot of switches.

Flag Description
1 Force driver installation
2 Suppress a prompt to connect a device
4 Suppress the creation of a Programs and Features entry for a driver package
8 Install an unsigned driver package
16 Remove installed files

Happy package building.

Source: Microsoft

SpecialFolders (VBS)

object.SpecialFolders(objWshSpecialFolders)

Values are:

  • AllUsersDesktop
  • AllUsersStartMenu
  • AllUsersPrograms
  • AllUsersStartup
  • Desktop
  • Favorites
  • Fonts
  • MyDocuments
  • NetHood
  • PrintHood
  • Programs
  • Recent
  • SendTo
  • StartMenu
  • Startup
  • Templates
Dim WshShell, sDesinationPath
Set WshShell = WScript.CreateObject("WScript.Shell")
sDesinationPath = WshShell.SpecialFolders("AllUsersStartMenu")

Source: Microsoft

Bootable USB Flash Drive (CMD)

A quick guide to make an USB Flash Drive bootable. This is usefull if you use Microsoft Windows installation images.

Open Command Prompt as an Administrator and go to town with these command steps:

diskpart
list disk (note the drive number of the USB flash drive)
select disk "drive number"
clean
create part pri - NOTE: if flash drive is larger than 32Gb use size=32000 or 16000 to limit size of partition for FAT32 file system
select part 1
format fs=fat32 quick
active
exit

Now the USB flash drive is ready for a Windows installation image

Source: Microsoft