Astalavista Posted June 25, 2005 Share Posted June 25, 2005 (edited) 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 installsometimes 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 wpi2. HighLight all the files in your wpi folder3. Right click and Select Winrar > select add to archive >4. Select create SFX archive5. click on comment tab and enter this code;The comment below contains SFX script commandsSetup=wpi.cmdSilent=1Overwrite=16. We need to edit our runonceEX.cmd to look like thiscmdow @ /HID@echo offFOR %%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\RunOnceExREG ADD %KEY%\001 /V 1 /D "%CDROM%\Installer.exe" /fEXIT7. Place your Installer.exe or whatever you want to call it on the root of your CD / or DVD U.A.Enjoy! from Astalavista! Edited June 26, 2005 by Astalavista Link to comment Share on other sites More sharing options...
blinkdt Posted June 25, 2005 Share Posted June 25, 2005 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.exeicon=wpi.icoAs 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.au3AutoItSetOption("TrayIconHide", 1)AutoItSetOption("WinTitleMatchMode", 4)BlockInput(1)Run( @ScriptDir & "\cleanup.cmd", "", @SW_HIDE)cleanup.cmd@echo offIF 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=%%dCall %cdrom%\programs\cleanup\desktop.cmd:ContinueRD /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\TEMPCLSEXITI 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.au3AutoItSetOption("TrayIconHide", 1)AutoItSetOption("WinTitleMatchMode", 4)BlockInput(0)ProcessWaitClose("mshta.exe")RunWait("cleanup.exe")Run("restart.exe")Restart.au3AutoItSetOption("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 ExitLoopNextIf NOT $opened ThenShutdown(6)EndIfSleep(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) ExitElseIf $Answer = $No Then ExitEndIfCompile 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 More sharing options...
Astalavista Posted June 26, 2005 Author Share Posted June 26, 2005 blinkdtnice work but overly complicated for me.I like to keep things very simple. I have a cleanup.exe at the end of mywpi process. which does exactly what you described. If i want to create a DVD w/ just my applicationsI use AutoPlay which you can download on a trial basis.I also create a password protection system. So only the personI want can access the DVD +R media.Again, no offense but i like to keep it simple. But i am sure someonewill find it very useful. Link to comment Share on other sites More sharing options...
blinkdt Posted June 26, 2005 Share Posted June 26, 2005 No offense ever taken, Asta, simple is always good. Link to comment Share on other sites More sharing options...
zeko Posted June 26, 2005 Share Posted June 26, 2005 thanks, astalavista. since this really is simple, im gonna give it a try. Link to comment Share on other sites More sharing options...
Benzal Posted June 26, 2005 Share Posted June 26, 2005 (edited) 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 installsometimes 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 June 26, 2005 by Benzal Link to comment Share on other sites More sharing options...
Astalavista Posted June 26, 2005 Author Share Posted June 26, 2005 sorry i dont understand your question Link to comment Share on other sites More sharing options...
Benzal Posted June 26, 2005 Share Posted June 26, 2005 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 installsometimes 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 More sharing options...
TheeBeets Posted June 26, 2005 Share Posted June 26, 2005 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? Link to comment Share on other sites More sharing options...
Benzal Posted June 30, 2005 Share Posted June 30, 2005 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 More sharing options...
Benzal Posted June 30, 2005 Share Posted June 30, 2005 (edited) 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$\$1And call it from Winnt.sif????As you can see I have quite a few questions.... I'm just tryin to get things right. Edited June 30, 2005 by Benzal Link to comment Share on other sites More sharing options...
Benzal Posted July 9, 2005 Share Posted July 9, 2005 Can u please explain this, where do I find this runonceEX.cmd???6. We need to edit our runonceEX.cmd to look like thisCODEcmdow @ /HID@echo offFOR %%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\RunOnceExREG ADD %KEY%\001 /V 1 /D "%CDROM%\Installer.exe" /fEXIT Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now