Jump to content

Start Post-Install programs with Multiboot DVD


drmarvin

Recommended Posts

I don't know if anyone else would fine this useful, but I thought I'd offer what I had.

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/board/index.php?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

Link to comment
Share on other sites

  • 1 month later...

thanx for taking the time to post this this is exactly what i was looking for, i`m on the last stage of my multi os dvd.:P

i must admit i`m a complete novice :whistle: when it comes to scripts so a little help would be appreciated, can you tell me exactly how to use this script ie what commands to use and when to call it :blushing:

Link to comment
Share on other sites

  • 4 weeks later...

You can start the script in a number of ways. Good examples are the same as for XPlode (http://www.msfn.org/board/index.php?showtopic=15076), but I choose to start minhe with [GuiRunOnce] in the winnt.sif file. I haven't tried it any other way, but I figure any other way will work too. This is the command line that I use in the winnt.sif file:

[GuiRunOnce]

"%systemroot%\system32\cmd.exe /c cscript /nologo %systemroot%\wpi.vbs"

This works because as I said before, I put the wpi/vbs script in the $OEM$\$$ directory under each OS. Then it works, and you just have to change the one post-install directory on the DVD.

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...