Jump to content

How To WPI from CD easy Steps 123


Recommended Posts

I want to share with you guys how i run my WPI off my CD.

Goal:

* To launch WPI from your CD

* To Be able to Launch WPI post install

sometimes you want to install some other stuff and you thought you didn't need.

* Time to complete Task ~ 5 Mins

[Download Sample Here. Just launch it.

1. Make your wpi

2. HighLight all the files in your wpi folder

3. Right click and Select Winrar > select add to archive >

4. Select create SFX archive

5. click on comment tab and enter this code

;The comment below contains SFX script commands
Setup=wpi.cmd
Silent=1
Overwrite=1

6. We need to edit our runonceEX.cmd to look like this

cmdow @ /HID
@echo off

FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\WIN51IP.SP2 SET CDROM=%%i:

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY%\001 /V 1 /D "%CDROM%\Installer.exe" /f

EXIT

7. Place your Installer.exe or whatever you want to call it on the root of your CD / or DVD U.A.

snap13rb.jpg

Enjoy! from Astalavista!

Edited by Astalavista
Link to comment
Share on other sites


Thanks, Asta. While we're on the subject, here's my method:

Grab a copy of AutoRun.exe from Tarma Software Research and place it at the root of the CD. The user manual is brief and well-written, explaining in detail how to use the handful of switches employed by this nifty little utility. Then create an AUTORUN.INF file. Mine looks like this:

[autorun]
open=autorun.exe -q2 -x wpi\WPI.hta cleanup.exe finish.exe
icon=wpi.ico

As you can see, autorun.exe first runs the WPI app and then let's me run a "cleanup" operation and a "finish" operation. My cleanup is an AutoIt script that calls (and hides) a batch file:

Cleanup.au3

AutoItSetOption("TrayIconHide", 1)
AutoItSetOption("WinTitleMatchMode", 4)
BlockInput(1)
Run( @ScriptDir & "\cleanup.cmd", "", @SW_HIDE)

cleanup.cmd

@echo off
IF NOT EXIST "%programfiles%\Rocket\RKlauncher.exe" GOTO Continue
::Locate the CDROM drive if necessary, where AUTORUN.INF exists at the root...
FOR %%d IN (c: d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x: y: z:) DO IF EXIST %%d\AUTORUN.INF SET CDROM=%%d
Call %cdrom%\programs\cleanup\desktop.cmd
:Continue
RD /S /Q  "%systemdrive%\Drivers"
ECHO Y | Del "%systemdrive%\WINDOWS\*.bmp"
ECHO Y | Del "%systemdrive%\*.log"
DEL /F "%systemdrive%\Documents and Settings\All Users\Start Menu\Programs\Startup\Finis***.exe"
@Rmdir %systemdrive%\TEMP /s/q
@mkdir %systemdrive%\TEMP
@Rmdir %systemdrive%\WINDOWS\TEMP /s/q
@mkdir %systemdrive%\WINDOWS\TEMP
CLS
EXIT

I allow users to select a program written by RaduKing during the WPI install. If they choose it, then desktop icons are removed. If not, then not.

My finish.exe is an AutoIt script that simply waits for WPI and the cleanup operation to finish before launching a restart script that ejects the CD and prompts the user to choose whether to restart the machine:

Finish.au3

AutoItSetOption("TrayIconHide", 1)
AutoItSetOption("WinTitleMatchMode", 4)
BlockInput(0)
ProcessWaitClose("mshta.exe")
RunWait("cleanup.exe")
Run("restart.exe")

Restart.au3

AutoItSetOption("TrayIconHide", 1)
AutoItSetOption("WinTitleMatchMode", 4)
BlockInput(0)
SplashTextOn("", "" & @CRLF & "Installation completed successfully!"  & @CRLF & "", 275, 58, -1, -1, 1, "Arial", 12, 12)
Sleep(2000)
SplashOff()
Sleep(1000)
$driveArray = StringSplit("DEFGHIJKLMNOPQRSTUVWXYZ", "")
For $i = 1 To 23
$opened = CDTray($driveArray[$i] & ":", "open")
If $opened Then ExitLoop
Next
If NOT $opened Then
Shutdown(6)
EndIf
Sleep(3000)
;Restart option
$Yes = 6
$No = 7
$Answer = MsgBox(4, "User Option", "Do you want to restart the Machine?")
If $Answer = $Yes Then
Sleep(3000)
Shutdown(6)
Exit
ElseIf $Answer = $No Then
Exit
EndIf

Compile the AutoIt scripts and place all files at the root of the CD with Autorun.exe. Takes a little time to set it all up, but it works great for me!

Link to comment
Share on other sites

blinkdt

nice work but overly complicated for me.

I like to keep things very simple. I have a cleanup.exe at the end of my

wpi process. which does exactly what you described.

If i want to create a DVD w/ just my applications

I use AutoPlay which you can download on a trial basis.

I also create a password protection system. So only the person

I want can access the DVD +R media.

Again, no offense but i like to keep it simple. But i am sure someone

will find it very useful.

Link to comment
Share on other sites

Just to make sure I understood this...

Does this avoid all your apps that you have on your windows cd to be intalled on the hd hense saving time????

Also what did u exactly mean here???

quote:"To Be able to Launch WPI post install

sometimes you want to install some other stuff and you thought you didn't need."

Soz for the stupid questions but I'm fairly new...

Edited by Benzal
Link to comment
Share on other sites

that was quick I've jsut modded my initial post I will repeat here with modifications:

Just to make sure I understood this...

Does this avoid all your apps that you have on your windows cd to be intalled on the hardrive in the c:\install folder hense saving time????

Also what did u exactly mean here???

quote:"To Be able to Launch WPI post install

sometimes you want to install some other stuff and you thought you didn't need."

Soz for the stupid questions but I'm fairly new...

Link to comment
Share on other sites

that was quick I've jsut modded my initial post I will repeat here with modifications:

Just to make sure I understood this...

Does this avoid all your apps that you have on your windows cd to be intalled on the hardrive in the c:\install folder hense saving time????

sometimes you want to install some other stuff and you thought you didn't need."

Soz for the stupid questions but I'm fairly new...

Hey Asta I think what he means is does this automatically extract the program files directories so that all the applications are there or does it use an .exe or .msi installer?

Link to comment
Share on other sites

Yeah basically with WPI regarless what you want to install, it still puts all the installer files on your hd...

Then that obliges you to have a cleanup script to delete the C:\install folder...

Does you way run the installtion process straight from the cd hense avoiding putting temp files on your hd????

Link to comment
Share on other sites

Alrite I've read through your thread a few times, I think I understand what you mean but could you give a bit more detail on the install....

ex:

From what you say you have to start and create a wpi installation setup independant from your unattended windows installtion folders...

Then you go into your wpi folder and compress all files inside including the install folder which has all your programs/utilities (in my case more than a gig).

Once you have made the sfx archive with comment, you need to edit runonceEX.cmd.

Where is that file/do I have to create it (is that winnt.sif file)?????

Once I have done that i just put the sfx archive in the root of my unattended cd and that is it....All should work.

Don't I have to mod my Winnt.sif file to launch the installer in the 1st place.

Do I just create a runonceEX.cmd in the following folder?

$OEM$\$1

And call it from Winnt.sif????

As you can see I have quite a few questions.... I'm just tryin to get things right.

Edited by Benzal
Link to comment
Share on other sites

  • 2 weeks later...

Can u please explain this, where do I find this runonceEX.cmd???

6. We need to edit our runonceEX.cmd to look like this

CODE

cmdow @ /HID

@echo off

FOR %%i IN (D E F G H I J K L M N O P Q R S T U V W X Y Z) DO IF EXIST %%i:\WIN51IP.SP2 SET CDROM=%%i:

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx

REG ADD %KEY%\001 /V 1 /D "%CDROM%\Installer.exe" /f

EXIT

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