You are on page 1of 8

Hot Keys: --------"Alt-A" Select All. "Alt-B" Show Extra Buttons. "Alt-C" Toggle Config Wizard.

"Alt-D" Select Defaults. "Alt-Enter" Begin Install. "Alt-G" Global Variables. "Alt-M" Toggle Manual. "Alt-N" Select None. "Alt-O" Toggle Options Wizard. "Alt-T" Toggle ToolTips On/off. "Alt-W" Toggle About WPI. "Esc" If the screen is not the main install screen, will return to the main inte rface. Otherwise you will exit WPI. "F1" Toggle Manual. "F2" Toggle Options Wizard. "F3" Toggle Config Wizard. "F12" Toggle About WPI. Comparison operators: --------------------">" "<" ">=" "<=" "==" "!=" Greater Than Less Than Greater Than or equal to Less Than or equal to Equal to (not "=", which assigns a value to a variable.) Not equal to

Logical operators: -----------------"&&" "||" "!" AND OR NOT


%SYSDIR%: %SYSTEMDRIVE%: %TEMP%: (Current User) %USERPROFILE%: (Current User) %WINDIR%: %WPIPATH%: Conditions: ----------ConnectedToInternet() Usage: ConnectedToInternet() Returns: true or false DriveAvailableSpace(Drivespec) Usage: DriveAvailableSpace("C:")>75 or DriveAvailableSpace("C:\")>75 Returns: 150 (gigabytes) or -1 if not exists DriveExists(Drivespec) Usage: DriveExists("E:") Returns: true or false DriveFileSystem(Drivespec) Usage: DriveFileSystem("C:")=="NTFS" or DriveFileSystem("C:\")=="NTFS" Returns: FAT16, FAT32, NTFS, or "". DriveShareName(Drivespec) Usage: DriveShareName("X:")=="\\MyServer\Folder" or DriveShareName("X:\")=="\\My Server\Folder" Returns: "" or a name like "\\server\share". Must be a mapped network drive. DriveTotalSize(Drivespec) Usage: DriveTotalSize("C:")>=100 or DriveTotalSize("C:\")>=100 Returns: 150 (gigabytes) or -1 if not exists DriveType(Drivespec) Usage: DriveType("D:")=="FIXED" Returns: UNKNOWN, REMOVABLE, FIXED, NETWORK, CDROM, or RAMDISK DriveVolumeName(Drivespec) Usage: DriveVolumeName("C:")=="Music" or DriveVolumeName("C:\")=="Music" Returns: "" or a name. C:\ is usually blank. FileExists(Filespec) Usage: FileExists("C:\Program Files\ReadMe.txt") Returns: true or false fileVersionGreaterThan(Version,Filespec) Usage: fileVersionGreaterThan("7.0",getFileVersion("C:\Program Files\Internet Ex plorer\iexplore.exe")) Usage: fileVersionGreaterThan("2.0.40115.0",RegKeyValue("HKEY_LOCAL_MACHINE\SOFT WARE\Microsoft\Silverlight\Version")) Returns: true or false

FolderExists(Filespec) Usage: FolderExists("C:\test\") Returns: true or false getAntiVirusProduct() Usage: getAntiVirusProduct()=="AVG Anti-Virus Free" Returns: name of antivirus software registered with Windows Security Center. getArch() Usage: getArch()=="AMD64" Returns: x86, AMD64, or IA64 (Itanium). getArch6432() Usage: getArch6432()=="AMD64" Returns: AMD64 or NOT_DEFINED. getArchIdentifier() Usage: getArchIdentifier()=="x86 Family 15 Model 4 Stepping 8" Returns: x86 Family 15 Model 4 Stepping 8 getArchMHz() Usage: getArchMHz()>1800 Returns: 2002 (2GHz) getArchName() Usage: getArchName()=="AuthenticAMD" Returns: AuthenticAMD, GenuineIntel, etc. getArchNameString() Usage: getArchNameString()=="Intel(R) Celeron(R) M processor 1.50GHz" Returns: Intel(R) Celeron(R) M processor 1.50GHz getBaseBoardManufacturer() Usage: getBaseBoardManufacturer()=="ASUSTeK Computer Inc." Returns: Name of motherboard manufacturer getBaseBoardModel() Usage: getBaseBoardModel()=="K8VSEDX" Returns: Model of motherboard getBIOSCaption() Usage: getBIOSCaption()=="BIOS Version 73.08" Returns: Long string BIOS version getBIOSManufacturer() Usage: getBIOSManufacturer()=="Phoenix" Returns: Name of BIOS manufacturer getBIOSVersion() Usage: getBIOSVersion()=="PTLTD - 6040000" Returns: Short string BIOS version getBits() Usage: getBits()==64 Returns: 32 or 64 getCDBurnerID() Usage: getCDBurnerID()=="PCI\VEN_.........." Returns: PnP Device ID. See Alt+G Hardware tab

getCDBurnerName() Usage: getCDBurnerName()=="Plextor......" Returns: Name of burner. See Alt+G Hardware tab getCDROMID() Usage: getCDROMID()=="PCI\VEN_.........." Returns: PnP Device ID. See Alt+G Hardware tab getComSpec() Returns: C:\WINDOWS\system32\cmd.exe or other appropriate path. getEnvVar(variable) Usage: getEnvVar("USERNAME")=="Mark" Returns: The value or if invalid the same name passed. getFileSize(Filespec) Usage: getFileSize("C:\test.txt")>100 Returns: number of bytes or -1 if not exists getFileType(Filespec) Usage: getFileType("C:\test.txt")=="PNG Image" Returns: "" or type, ie, "Text Document" getFileVersion(Filespec) GetFileVersion() *Use lower case version, but this works! Usage: getFileVersion("C:\Program Files\AVG\AVG.exe") Returns: version number or 0 getFirewallProduct() Usage: getFirewallProduct()=="Sygate Personal Firewall" Returns: name of firewall software/hardware registered with Windows Security Cen ter. getFolderSize(Filespec) Usage: getFolderSize("C:\windows\")>10000 Returns: number of bytes or -1 if not exists getFreeRAM() Usage: getFreeRAM()>300 Returns: 512 (megabytes) getHDDControllerID() Usage: getHDDControllerID("PCI\VEN_......") Returns: true or false. See Alt+G Hardware tab Note: Must know ID ahead of time. getIEver() Usage: getIEver()=="7.0" Returns: 5.5, 6.0, 7.0, 8.0 getKeyboardID() Usage: getKeyboardID()=="PCI\VEN_.........." Returns: PnP Device ID. See Alt+G Hardware tab getModemID() Usage: getModemID()=="PCI\VEN_.........." Returns: PnP Device ID. See Alt+G Hardware tab getmshtaBits()

Usage: getmshtaBits()==64 Returns: 64 or 32 getNetworkAdapterID() Usage: getNetworkAdapterID()=="PCI\VEN_.........." Returns: PnP Device ID. See Alt+G Hardware tab getNumProcs() Usage: getNumProcs()>1 Returns 1, 2, 4, etc. getOSeditionID() Usage: getOSeditionID()=="Ultimate Edition" Returns: Home Basic Edition, Home Basic Premium Edition, etc..., or Not found getOSlang() Usage: getOSlang()=="ENU" Returns: three letter code; ENU, FRA, ITA, etc. getOSlocale() Usage: getOSlocale()=="English - United States" Returns: English - United States getOSver() Usage: getOSver()=="XP" Returns: 08, 03, Vista, XP, 2K, NT, ME, 98, or 95 getPointingDeviceID() Usage: getPointingDeviceID()=="ACPI\PNP.........." Returns: PnP Device ID. See Alt+G Hardware tab getSMBIOSVersion() Usage: getSMBIOSVersion()=="2.3" Returns: Short string BIOS version getSoundDeviceID() Usage: getSoundDeviceID()=="PCI\VEN_.........." Returns: PnP Device ID. See Alt+G Hardware tab getSPver() Usage: getSPver()==3 Returns: "", 1, 2, 3, 4, 5, or 6 (n) getSysManufacturer() Usage: getSysManufacturer()=="Gateway" Returns: Gateway, Dell,..., To Be Filled By O.E.M. getSysModel() Usage: getSysModel()=="MX3231" Returns: a string with model or To Be Filled By O.E.M. getSysPCType() Usage: getSysPCType()=="Desktop" Returns: Unspecified, Desktop, Mobile, Workstation, Enterprise Server, Small Off ice and Home Office (SOHO) Server, Appliance PC, Performance Server, Maximum. NOTE: Mobile does NOT refer to laptops. getSystemEnclosureType() Usage: getSystemEnclosureType()=="Laptop"

Returns: Laptop or Desktop Note: This cannot be checked by WMI, so it is based on whether or not a battery exists and a PCMCIAController exists. Not perfect by any means. getSysType() Usage: getSysType()=="x64-based PC" Returns: x64-based PC, X86-based PC, MIPS-based PC, Alpha-based PC, Power PC, SH -x PC, StrongARM PC, 64-bit Intel PC, 64-bit Alpha PC, Unknown, X86-Nec98 PC NOTE: The 'x' is not always lower-case. getTotalRAM() Usage: getTotalRAM()>512 Returns: 1024 (megabytes) getVideoControllerID() Usage: getVideoControllerID()=="PCI\VEN_.........." Returns: PnP Device ID. See Alt+G Hardware tab getWirelessNetworkAdapterID() Usage: getWirelessNetworkAdapterID()=="PCI\VEN_.........." Returns: PnP Device ID. See Alt+G Hardware tab hasDVDBurner() Usage: hasDVDBurner() Returns: true or false. See Alt+G Hardware tab hasDVDROM() Usage: hasDVDROM() Returns: true or false. See Alt+G Hardware tab hasDVDDrive() Usage: hasDVDDrive() Returns: true or false. See Alt+G Hardware tab isComputerName(Name) Usage: isComputerName("Accounting") Returns: true or false isDesktopLoaded() Usage: isDesktopLoaded() Returns: true or false isInstalled(Program) Usage: isInstalled("Adobe Reader 8.1.2") Returns: true or false WARNING: This could take from 5 to 30 seconds for each check! isLogOnServer(Server) Usage: isLogOnServer("\\Server1") Returns: true or false Note: If not on a real network, domain will be the same as computer name. isUserDomain(Domain) Usage: isUserDomain("Workgroup") Returns: true or false Note: If not on a real network, domain will be the same as computer name. isUserName(Name) Usage: isUserName("Joe User") Returns: true or false

RegKeyExists(Key) Usage: RegKeyExists("HKEY_CURRENT_USER\Software\WPI\Theme") Returns: true or false RegKeyValue(Key) Usage: RegKeyValue("HKEY_CURRENT_USER\Software\WPI\Theme")=="Windows" Returns: true or false JScript: -------{JSCRIPT}=alert(Message) Usage: {JSCRIPT}=alert("Open a window to show a message") {JSCRIPT}=CreateShortcut(Description,IconLocation,Hotkey,TargetPath,Arguments,De stination,Folder) Usage: {JSCRIPT}=CreateShortcut("Shortcut to ChangeLog","C:\WINDOWS\NOTEPAD.EXE" ,"Ctrl+F","C:\WPI\ChangeLog.txt","-c -q SILENT","Desktop","Work") {JSCRIPT}=DeleteRegKey(Key) Usage: {JSCRIPT}=DeleteRegKey("HKEY_CURRENT_USER\Software\WPI\WPI_Rocks") {JSCRIPT}=setEnvVar(Variable,Value) Usage: {JSCRIPT}=setEnvVar("USERNAME","Mark") {JSCRIPT}=TimedWaitForDelete(Delay,Filespec,Timeout) Usage: {JSCRIPT}=TimedWaitForDelete(10,"C:\Program Files\WinRar\WinRAR.exe",10) {JSCRIPT}=TimedWaitForFile(Filespec,Timeout) Usage: {JSCRIPT}=TimedWaitForFile("C:\Program Files\WinRar\WinRAR.exe",10) {JSCRIPT}=WriteRegKey(Key,Value,Type) Usage: {JSCRIPT}=WriteRegKey("HKEY_CURRENT_USER\Software\WPI\WPI_Rocks",1,"REG_D WORD") Commands: --------{DELETE} C:\File.txt {DELETEDIR} C:\Windows (DO NOT DO THIS! Just an example) {DIRCOPY} C:\Windows D:\Windows\ {EXTRACT} C:\Source.rar C:\Destination\ (Supports most compression types!) {FILECOPY} C:\File.txt D:\FILES\File.txt {FILEMOVE} C:\File.txt D:\Files\File.txt (Cannot be used from a CD\DVD Source) {INSTINF} C:\File.inf (Used for addon\or driver style inf's with a defaultinstal l section) {MAKEDIR} C:\Folder {REBOOT} 1 - 1000 Will restart your system after the countdown! No value = immed iately.

{REGDLL} C:\File.dll {REGEDIT} C:\File.reg {RENAME} C:\File.txt C:\NewFile.txt (The file HAS to stay in the same dir) {RUNBG} C:\File.exe (Run in background) {SLEEP} 1 - 1000 Every number = 1 second {TASKILL} Program.exe {UNREGDLL} C:\File.dll RegDLL calls: regsvr32.exe /s %dll% UnRegDLL calls: regsvr32.exe /u /s/ %dll% InstINF calls: rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %inf% (%dll% and %inf% are your chosen files) Command line arguments: ----------------------options=useroptions.js config=config.js check=Server timer=300 theme=Windows resolution=1600 Resolutions: 800 1024 1280 1400 1600 1920 = = = = = = 800x600 12802 = 1280x720 1024x768 12803 = 1280x768 1280x1024 12804 = 1280x800 1400x1050 1440 = 1440x900 1600x1200 16002 = 1600x1024 1920x1400 1680 = 1680x1050 19202 = 1920x1080

Use quotes if space in name.