When you make a Multiboot DVD, you most likely have the same stuff to install on most OS'es. Of course, you can make $OEM$ folders in each OS, and after optimization, there is no extra space, but if you make a change, you have to manually change all of them. Therefore, I came up with the idea that I wanted to have a Preinstall dir in the root of the DVD, and the Installer in the root also. The problem was of how to start the program off the CD.
With this VBS script, you can put just this file in your $OEM$ directory (I put it in \$OEM$\$$ just for convenience). My exaple uses WPI (http://www.msfn.org/...showtopic=28125) especially because it uses easy CDROM variables, but I guess it's no problem to use it with XPlode or something.
The script uses the Sourcepath reg entry, but the problem was that on a multiboot DVD, the Sourcepath was not the DVD root. This fixes that problem. Feel free to hack and change, I just hope it's useful to someone else.
Dim WshShell, testpath, key, fullpath, sliced
key="HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\Sourcepath"
Set WshShell = WScript.CreateObject("WScript.Shell")
testpath=WshShell.RegRead(key)
sliced = testpath.slice(0,2)
' change "wpi\wpi.hta" to whatever your path on the DVD is for your program
fullpath = sliced & "wpi\wpi.hta"
WSHShell.Run fullpath



Help
Back to top










