This tool is designed to allow the user to automatically uninstall and/or reinstall all WeiDU mods from a game, based on the contents of the WeiDU.log. In a BGEE install, for instance, this can be used to uninstall all mods before allowing BGEE to update, and then can be used to automatically reinstall all of the mods afterwards. This is also particularly useful in mod testing applications when a mod/mods need to be uninstalled and reinstalled repetitively. A convenient TreeView list of the currently installed mods (based on the WeiDU.log) can be viewed by going to View->Installed Mods in the GUI. It now also has the added functionality of running a change-log on individual files, or on the entire contents of the Override directory.

Basic Usage:

After running PS WeiDU (Un)Installer and selecting a WeiDU.log, the GUI will load and the automatic installation and uninstallation scripts will be generated (on the left side of the GUI). There are three options for how to run them: Quiet, CMD, and Stream.

  1. The default is the CMD option which will run the install/uninstall script in a normal command prompt window, which should* allow the user to enter any prompted information (such as the screen resolution for the Widescreen mod) as necessary. This option cannot save the console output to the log file.
  2. The Quiet option will run the script quietly in the background, and will add the console output to the log file if logging is enabled.
  3. The Stream option will run the script quietly in the background, but will stream the console output to a notepad window in real-time. It also adds the console output to the log file if logging is enabled.

A convenient TreeView list of the currently installed mods (based on the WeiDU.log) can be viewed by going to View->Installed Mods in the GUI.

* I haven't actually tested it...

Intermediate Usage:

At the right of the GUI there options to do a "Directory Cleanup" and to "Update WeiDU."

Directory Cleanup

The Default directory cleanup option will allow you to delete all of the mod-associated files in the game directory. For instance, after batch uninstalling all mods, you can delete all of the files and folders that were part of mods, thus reverting your installation to its vanilla state. The Extended option will also delete the game's temp files, cache, logs, crash dumps in BGEE, etc.

Update WeiDU

The Setup-****.exe files that go with each mod are just renamed WeiDU.exe. If you actually look at one of the .DEBUG files after installing some mods, you may see something like this:

WeiDU v 22900 Log

D:\Program Files\Black Isle\Baldur's Gate\setup-bg1tweaks.exe
version = 21500
Newest WeiDU is version 22900, updating!
WeiDU files in version order:
[setup-bg1tweaks.exe] version 22900
[setup-ds.exe] version 21500
[setup-DarkHorizons.exe] version 21500
[setup-bg1ub.exe] version 21500
[setup-bg1tweaks.exe] loaded, 685056 bytes
Copying [setup-bg1tweaks.exe] -> [setup-ds.exe]: true
Copying [setup-bg1tweaks.exe] -> [setup-DarkHorizons.exe]: true
Copying [setup-bg1tweaks.exe] -> [setup-bg1ub.exe]: true
[./Chitin.key] loaded, 238496 bytes
[./Chitin.key] 159 BIFFs, 16694 resources

WeiDU is auto-updating itself. It finds the newest version of itself in the game directory, and updates all of the other older mod's setup files with the newest version. This ensures compatibility as mods are being installed/uninstalled/reinstalled/whatever. This option in PS WeiDU (Un)Installer downloads the newest version of WeiDU from online, and updates all of the mods' .exe files. Thus, for example, when the new version of WeiDU becomes compatible with BGEE, you do not have to wait for one of the mods you want to install to be updated with the new version of WeiDU, you can easily update it yourself. This functionality is not related to or dependent on the automatic installation and uninstallation of mods. It is a bonus.

Advanced Usage:

Logging can be disabled by setting Logging=0 under [Program Options] in the config file (<\PS WeiDU (Un)Installer (files)\ PS WeiDU (Un)Installer Config.txt>). The log file is located at <\PS WeiDU (Un)Installer (files)\ PS WeiDU (Un)Installer Log.txt>. Each WeiDU.log, AutoInstall.bat, Autouninstall.bat, as well as the console output, list of files deleted, notes about WeiDU updates, etc. are all saved to the log file if logging is enabled.

In the config file, you will notice that GUI=1 by default. This enables the GUI. On the other hand, if GUI=0 the GUI will not appear and you will be prompted to select your WeiDU.log, and then AutoInstall.bat and AutoUninstall.bat will automatically be saved in that game directory.

If you are running the program via the command line switches, however, this takes precedence over the setting in the config file and the full GUI will not appear. Anything that can be done within the GUI can be done via the command line. The recognized command line parameters (read in this order) are:

-loadWeiDU "full file path to WeiDU.log in quotes"
-autoinstall.load "full file path to AutoInstall.bat in quotes" "full file path to AutoInstall.bat in quotes"
-autouninstall.load "full file path to AutoUninstall.bat in quotes" "full file path to AutoUninstall.bat in quotes"

The other key in the config file that you can change if you want is DirectUpdateURL=. This value is blank by default, and will use the latest windows version of WeiDU found in my PS Tool DownloadLinks database. You can overwrite this by setting DirectUpdateURL to the full URL of the archive containing the version of WeiDU that you want to use. Almost any archive format that WeiDU might be packaged in is now supported.

PS WeiDU (Un)Installer > IntroductionBack To Top


Installation is very simple: just extract all of the contents of the .RAR archive into any directory and run "PS WeiDU (Un)Installer.exe" Keep the program's associated folder <PS WeiDU (Un)Installer (files)\> in the same directory as the .exe. If you are not interested in the source files, you can delete the "lib" folder located at <PS WeiDU (Un)Installer\PS WeiDU (Un)Installer (files)\lib\>. This will save about 4.5 MB of space.

PS WeiDU (Un)Installer > InstallationBack To Top

Frequently Asked Questions

Q: When I run "PS WeiDU (Un)Installer.exe", the window does not appear or shows up improperly.
A: In the config file, delete the "!=" key under [Recall] and rerun the program.

PS WeiDU (Un)Installer > FAQBack To Top


See the "About" section of the program found at Help->About.

Tools used:

PS WeiDU (Un)Installer > CreditsBack To Top

Version history

16 March 2013 - Version 0.03:
  • Fixed bug where main window was not reactivated properly after the loading screen closed.
  • Fixed bug where Run commands e.g. Readme, License, Log, change-log, did not always work properly.
28 January 2013 - Version 0.02:
  • Remember settings and file paths
  • Menu option to reset settings to default
  • Fixed a bug when loading a WeiDU log file not called "WeiDU.log"
  • Added ability to perform a change-log on individual files or the entire override directory thanks to a modified version of Sasha Al'Therin's Mass file change log tool
  • Reworked "Update WeiDU" to make it easier to keep track of newest download location
  • Added custom portable version of Universal Extractor to allow extraction of new WeiDU from virtually any archive format
  • Added -changelog.specific and -changelog.all command line parameters
10 January 2013 - Version 0.01:
  • Initial release
PS WeiDU (Un)Installer > Version HistoryBack To Top