Paraglider WinBuilder Pages

SetTargetRoot  Winbuilder Script

Winbuilder script for the SetTargetRoot program. It searches all drives for boot.ini files and extracts the directory associated with the default entry assuming it is on the same drive as the boot.ini file. If no windows installations are found then it will show a browse dialog allowing the windows installation to be selected. If multiple windows installations are found then a dialog will be shown allowing one to be chosen.

Whichever windows installation is found will be set into the TARGET_ROOT environment variable.

A setting change message will be broadcast to indicate the global environment variables have been updated.

The source code for the various language specific resource files is also included in script - It is not copied to the output directories when the winbuilder is run.

The program is called as follows:

SetTargetRoot {/en} {/f} {/n} {/v} {/w} {/s} {/h} {/t<Timeout>} {/i<Index>} {<Program> <Program Parameters>}

where:

if the optional parameter /en is specified then the program will exit without setting the environment variable and without showing any browse dialogs if no windows installations are found.

If /f is specified then scan all root directories on all drives looking for windows installations.

If /s is specified then the program specified in the command line will be run after setting the TARGET_ROOT environment variable.

If /n is specified then the current shell will not be notified of the setting change.

If /v is specified then use bcdedit.exe to scan vista boot manager files for windows installations.

If /w and /s is specified then SetTargetRoot will wait for the target command to finish before exiting.

If /h and /s is specified then the program run will be run hidden.

/t<Timeout> - If multiple windows installations are found then this is the timeout in seconds before the selection dialog is closed. Cancel will be autoselected if no default index is specified by the /i parameter

/i<Index> - If multiple windows are found then this specifies the index of the item in the list of windows installations that will be automatically selected when the timeout expires.