Jump to content

WPI 5.1

Recommended Posts


Windows Post-Install Wizard (WPI for short) is a hypertext application designed for giving users choice. While Windows XP offers many ways of customizing the setup process out of the box, its major drawback is the lack of being able to select which applications an end user may install. In the past, end users and administrators needed to either download the files manually, or create overly complex scripts that could only be used once. WPI allows you to create one image, which can then be custom configured, and optionally, automated, so that end users can install any applications that have been configured into WPI.

This release is loaded with requests, ideas, and bug fixes from user posts here in the forums. Most larger items are listed in the ChangeLog.txt file, while other small ones are not. There are many subtle changes and major improvements to the interface and inner-workings.

Here is the 5.1 changelog:

WPI ChangeLog. Modifications by Mark Ritter (mritter)

v5.1 Updates

* Can now restart or shut down the computer after installation is complete.
Can also allow the Desktop to load or not. Useful for making a Ghost

* Now every text is localized. The language files have many new lines in

* Updated, "tricked", all the file requesters to clear the default file
before opening to prevent sending a file name if hit Cancel.

* Took out all support for Disc Path. It was dead and a non-usable function
that was never accessable.

* Fixed bug in timer progress bar count down. Was going way too fast.

* Updated the options and config wizards to allow for creating new, loading
other, and saving current settings under different names.
There are new gadgets: New Options, Load, Save As...

The current files are displayed in the respective wizard. When exit each
wizard, that file is set as the default and will be loaded the next time WPI
is run. If the file does not exist it will default back to the original:
useroptions.js or config.js.

If the path contains '\WPI\WPIScripts\' it will be assumed the file is in the
WPI main folder and will change the path to relative './WPIScripts/'.

The files should be kept in the WPIScripts folder.

With the new command line args, you will have to specify them in your cmd
script since they are saved as registry entries.

* Updated the wpi.htm theme file yet again. Removed the config wizard <table>
gadget template and updated it to match the options wizard template. Sizes and
locations are now consistant. This does require a simple update to 5.0 themes.

* Added command line support to specify different config and user options

WPI.hta options=useroptions_mritter.js config=config_mritter.js check=Work timer=30

If a path is not specified for the file, it will assume they are in

It will still check for:

WPI.hta Work 30

for backwards compatibility. But update your tags, please. They will probably
change in the future. Thanks to Dje again for the code and help.

NOTE: Paths can be full (starting with a drive letter) or relative to WPI.hta
(starting with '.\' or '..\') and must end in '.js'. Spaces are supported only
is a path is provided and properly quoted: (config="c:\space in\file path.js").

* Took out function path(). It was redundant of replpath(), which is now
ReplacePath(), and the redundant code was actually never used. It was doing a
check that would never be true.
Dje then updated it more to handle all environment variables easier.

* Dje updated code to handle multiple lines in program names. Just put a
<br> in the text to break it.

* Split the huge 300K lang.js file into seperate language files to keep RAM
usage down and for easier editing. English is loaded as default, followed by
specified language. If text is missing, English is used.

* Added a fix for PNG transparency problem.

* Added Options -> Installer: Sort Within Categories. If checked will sort
the items in each of the categories. If not, then the order they are created
is maintained. Useful if you want items displayed or installed in a certain
order not condusive to ordr[].

* Fixed a bug with picw, pich, textl not displaying the proper values in the
Config wizard when switching entries. The default was being set in the wrong

* Updated code to reflect changes in config lists dynamically. No more having
to save the list first, reload, then go back to Options -> Installer tab.

* Added a drop down box in Config wizard to aid in selecting Configurations.

* Added a drop bow box in Options -> Installer wizard to aid in selecting a
category sort order.

* Fixed a bug in Audio Player showing a blank line if song list is empty.

* Install log now lists failures as *** Fail *** to help stand out.

* Updated Selections drop-down box to group items better.

* Put some standard defaults in the globals.js for times when there is not a
config.js and useroptions.js file and the first config entry is made; it would
no show up.

* Added function getSPver() to get the Service Pack value. Returns 1, 2, 3,
etc., or 'Not found'.



There is a slight upgrade to the theme file, wpi.htm, again. Before you complain, it is a very easy update:

Remove this section here:

<div id="layerconfig" class="opBg" align="left" style="position:absolute; display:none; z-index:100; overflow:auto; width:90%; height:86%; margin-left:50px; margin-top:75px;">
<table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">
<td height="40" valign="bottom">
<font class="opSide">
<script type="text/javascript">
<div id="configHeader" style="position:absolute; display:block; z-index:100; overflow:hidden; width:100%; height:100%;">
<td colspan="2">
<hr class="hrule" align="center">
<td class="txt" height="100%">
<div id="quickref" style="position:absolute; display:block; z-index:100; width:100%; height:100%; overflow:auto;">
<td width="625" class="txt">
<div id="config" style="position:absolute; display:block; z-index:100; width:100%; height:100%; overflow:auto;">

And paste this new code in its place:

<div id="layerconfig" class="opText" align="left" style="position:absolute; display:none; z-index:100; overflow:auto; width:100%; height:100%;">

That's it. By removing that code and putting it in the configwizard_template.htm file, the wizards are now the same size and location. Much better.

Also, at the top, change the version to 5.1+ theme:

<meta content="WPI Theme 5.1+">

All the included themes are current; use them as a baseline.

New Features

* The most useful addition is the ability to load and save different useroptions.js and config.js files, either from the command line or from within WPI. In the wizards at the bottom there are new gadgets to switch files. The last used will be remembered in a registry entry and used the next time WPI is started. You will have to specify which one to use in the command line when making your UACD:

WPI.hta options=useroptions_mritter.js config=config_work.js check=work timer=30

* The installer is stable and working with all types of switches and spaces in path names.

* Can now restart or shut down the computer after a delay or immediately.

* The lang.js is now split into individual language files for easier updating and translating. But more importantly, it saves on 500KB+ RAM for those with limited RAM.

* Changes in the Options and Config wizards are now more dynamic. Updates are made on the fly, a reload of the page is no longer necessary.


Download Here!

Thank You

I want to say "Thank you" to some people who have really helped work out some bugs and get new features online and working properly:

  • Dje - Many code improvements, ideas, beta testing
  • Dynaletik - beta testing and German translation (I kept him busy)
  • Sadicq for ideas and bug reports on the forums
  • Almulder, oneless, Dumpy Dooby, and other users who posted in the forums
  • All the translators - more texts to be updated
  • Kels for putting up with me and all my theme changes, beta testing


I am already working on version 5.2. Post bug reports and requests in the appropriate threads. My "to do list" will never be empty. I plan on working with WPI for a long time and keeping it the BEST program of it's kind.

Notes, Extras and Manual

Suggested disk folder layout:


With the above folder layout all your config entries should read like:


I have seperated the tools out from the main archive. You can download the tools here:

Tools archive.

Contents of the tools archive:


Universal Silent Switch Finder


WPI Config Lister




Here is a quick start package that will set your windows disk up to use WPI with runonceex all you need is to place this %oem% folder at the root of your windows disk. You MUST have the line "OemPreinstall=Yes" in your winnt.sif file if you want to have the MCE theme if you dont feel the need the cmdlines.txt will still run WPI for you even without a winnt.sif file.

%OEM% Folder.

Contents of the %OEM% archive:

Media Center Style XP Theme (NO uxtheme.dll hack needed!)


regentry to set MCE theme for runonceex window.



Download Here.

How to make a winnt.sif file.

Here is a small tutorial on how to add an app to WPI!

Ok this is a sample (Very simple) configuration for Windows Defender Beta 2

This assumes you have all of the WPI files either in the WPI folder at the root of your Windows cd or all of the WPI folders (Common, Graphics, WPIScripts, Tools, Install and Themes) and the file WPI.hta at the root of your cd.

Remember this is just the most basic and required entries for a program!

#1 Place the desired app in the install folder. (In this case WindowsDefender.msi)

#2 Run WPI.hta and choose “Config”

#3 Choose at the very top above the config section “Add”

#4 Enter in the name section “Windows Defender” ßNo quotes! Then click on any other section of the config area to activate the rest of the wizard.

#5 You will notice the Unique ID section gets automatically configured for you.

#6 All apps are selected to be installed by default right from the start so if you don’t want it selected by default you must uncheck this box.

#7 Choose a category for your app to be displayed in. If you want the app to be displayed in a category you don’t see simply chose other and a box will appear that will allow the entry of you choice.

#8 In the Command 1 section browse to the installation package you want to have installed. You will get (%CDROM%\WPI\Install\WindowsDefender.msi) to make this work from either a stand-alone CD or form a windows CD You should change this to “%wpipath%\Install\WindowsDefender.msi” Once again NO quotes!

#9 Add the necessary switches for the program to run silently i.e. %wpipath%\Install\WindowsDefender.msi /qn

#10 Select the Save and then the Exit buttons and you have now configured your first app!

Edited by Kelsenellenelvian
Link to comment
Share on other sites

i found i had to replace the whole main display section of wpi.htm for the themes to display correctly.

replacing just the layerconfig portion left the rest of the display messed up. although i could be wrong.

also in wpi.htm


<style type="text/css">
img { behavior: url("./wpiscripts/pngbehavior.htc"); }

not sure if this is needed as well.

Link to comment
Share on other sites

Looks great so far.

I just noticed there are some misclosed tags in the themes htm's, like </img>.

And another one ... the id "MediaPlayer" is defined twice ... it may interact ... *shrug*

And a small typo in core.js


Edited by sadicq
Link to comment
Share on other sites


Strange bug appear.

I put my config from 4.3.8 in 5.1. Imported OK. But then i add some description or delete some progs. Click Save AND in main window ALL my progs selected as Default install!!!??? :(

Aahhhell. How can i untick Instal by default for all progs in easy way. (By default i need ony 7 of 59). And by very good to fix that bug !

Link to comment
Share on other sites

Line number 1299 (not 1199) :)

I change this string but no way back. In cofiguration in all progs field By Default are CHECKED !!

So booring to uncheck this tick in every progs in configuration :(

Edited by fanatf1
Link to comment
Share on other sites

The modification kel said you to make prevents the error from happening. Once it has modified your config file, it remains that way unless you modify it by hand.

So, to change all the entries to not default open the config.js file in a text editor and replace (ctrl + h) all the occurances of





Edited by sadicq
Link to comment
Share on other sites


There is a slight upgrade to the theme file, wpi.htm, again. Before you complain, it is a very easy update:

Remove this section here:


I get stuck with this. searching in configwizardtemplate.htm with ctrl+f dont give any match at "layerconfig".

If i download a new 5.1, is this fixed in it or do i need to fix it by myself?

Edited by Solid as a rock
Link to comment
Share on other sites

Of course it is fixed. The code snippet reffers to the new themes, if someone wants to make one or to adapt a 5.0 one. Every theme in the wpi 5.1 archive was updated to the new standard, so that's why you can't find "layerconfig".

Link to comment
Share on other sites


Every theme, old and new, has layerconfig it in. It better or you would never see the config wizard and WPI would crash.

You want to be searching in wpi.htm not configwizardtemplate.htm.

(I hope I didn't say that in my original post)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...