MSFN Forum: How To WPI from CD easy Steps 123 - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How To WPI from CD easy Steps 123 My way of running WPI from CD Rate Topic: -----

#1 User is offline   Astalavista 

  • MSFN loyalist
  • PipPipPipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 3,338
  • Joined: 02-December 03

Posted 24 June 2005 - 11:42 PM

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.

Posted Image

Enjoy! from Astalavista!

This post has been edited by Astalavista: 26 June 2005 - 01:09 AM



#2 User is offline   blinkdt 

  • Somewhat Knowledgeable
  • PipPipPipPip
  • Group: Members
  • Posts: 582
  • Joined: 30-September 03
  • OS:Vista Ultimate x64
  • Country: Country Flag

Posted 25 June 2005 - 03:42 PM

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!

#3 User is offline   Astalavista 

  • MSFN loyalist
  • PipPipPipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 3,338
  • Joined: 02-December 03

Posted 26 June 2005 - 01:13 AM

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.

#4 User is offline   blinkdt 

  • Somewhat Knowledgeable
  • PipPipPipPip
  • Group: Members
  • Posts: 582
  • Joined: 30-September 03
  • OS:Vista Ultimate x64
  • Country: Country Flag

Posted 26 June 2005 - 02:04 AM

No offense ever taken, Asta, simple is always good.

#5 User is offline   zeko 

  • Junior
  • Pip
  • Group: Members
  • Posts: 67
  • Joined: 04-June 05

Posted 26 June 2005 - 03:08 AM

thanks, astalavista. since this really is simple, im gonna give it a try.

#6 User is offline   Benzal 

  • Newbie
  • Group: Members
  • Posts: 27
  • Joined: 05-June 05

Posted 26 June 2005 - 04:12 AM

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

This post has been edited by Benzal: 26 June 2005 - 04:13 AM


#7 User is offline   Astalavista 

  • MSFN loyalist
  • PipPipPipPipPipPipPipPipPip
  • Group: Banned
  • Posts: 3,338
  • Joined: 02-December 03

Posted 26 June 2005 - 04:13 AM

sorry i dont understand your question

#8 User is offline   Benzal 

  • Newbie
  • Group: Members
  • Posts: 27
  • Joined: 05-June 05

Posted 26 June 2005 - 04:15 AM

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

#9 User is offline   TheeBeets 

  • Member
  • PipPip
  • Group: Members
  • Posts: 234
  • Joined: 10-April 05

Posted 26 June 2005 - 03:06 PM

Benzal, on Jun 26 2005, 11:15 AM, said:

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...
<{POST_SNAPBACK}>


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?

#10 User is offline   Benzal 

  • Newbie
  • Group: Members
  • Posts: 27
  • Joined: 05-June 05

Posted 30 June 2005 - 03:59 AM

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

#11 User is offline   Benzal 

  • Newbie
  • Group: Members
  • Posts: 27
  • Joined: 05-June 05

Posted 30 June 2005 - 07:25 AM

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.

This post has been edited by Benzal: 30 June 2005 - 07:29 AM


#12 User is offline   Benzal 

  • Newbie
  • Group: Members
  • Posts: 27
  • Joined: 05-June 05

Posted 09 July 2005 - 04:14 AM

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

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy