MSFN Forum: plz runonce.cmd for 2cd install - MSFN Forum

Jump to content



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

plz runonce.cmd for 2cd install Rate Topic: -----

#1 User is offline   emadhamdy2002 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 25-January 07

Posted 25 April 2007 - 10:41 AM

i have windows os size 1.4 gb and have no dvd
i put WPI in a cd and windows files in another cd include $oem$

but i want to have a FULL runonce.cmd file so i can put it to run with cmdline to request for insert of the 2nd cd which include WPI and WPI.cmd
plz help soon here the CD
http://img235.images...54114990gx8.jpg


aftr the split

http://www.ninjadesi...mages/shot1.jpg
http://www.ninjadesi...mages/shot2.jpg

thnks for phknija for helping me bt i couldnot continue plz all wht i want just ready files to put directly for eunonce or any bat or cmd file to ask for the second cd which include wpi.cmd


#2 User is offline   phkninja 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 466
  • Joined: 28-February 05

Posted 25 April 2007 - 12:46 PM

add the following to runonce.bat

....
REM This is where we add the second disk
echo Please insert CD2, and press a key to continue
pause

for %%i 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 %%i:\wpi.cmd set CDROM2=%%i:

call %CDROM2%\wpi.cmd


This can be used wth a machine with only 1 cd drive (eject original disk, put in disk 1 and press a key) or in a machine with 2 cd drives (just press a key to continue).

The ..... is where you have the rst of your RunOnce.cmd file

This post has been edited by phkninja: 25 April 2007 - 12:47 PM


#3 User is online   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,756
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 25 April 2007 - 12:51 PM

Sheesh or you could simply goto the WPI forum and ask there :P

REM This is where we add the second disk
echo Please insert CD2, and press a key to continue
pause

for %%i 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 %%i:\wpi.cmd set CDROM2=%%i:

call %CDROM2%\wpi.cmd


This could very easily be added to the $oem$ runwpi.cmd file we already provide...

#4 User is offline   emadhamdy2002 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 25-January 07

Posted 25 April 2007 - 03:45 PM

thanks aloooot for the reply it helped me alot bt i hace another quetion how i can make it run in GUIrunonce according to specific order here my GUIRUNONCe

[GUIRunOnce]
command9="%SystemDrive%\DPsFnshr.exe"
%WinDir%\INSTALL\START.CMD
%WinDir%\INSTALL\ENC.EXE
%WinDir%\INSTALL\D.CMD
%WinDir%\INSTALL\WPI.CMD

coz i guess all run at the same time ecxpt for DPSfnshr

i want to make them to run in an order
can i add
command10="%WinDir%\INSTALL\START.CMD"
command11="%WinDir%\INSTALL\ENC.EXE"

and so on?

#5 User is offline   phkninja 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 466
  • Joined: 28-February 05

Posted 25 April 2007 - 03:59 PM

instead of re-inventing the wheel so to speak, take a look at this page from the unattended guide

#6 User is offline   emadhamdy2002 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 25-January 07

Posted 25 April 2007 - 11:02 PM

thnks alot man for ur reply bt hopd to tell me the order can i or not?

#7 User is online   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,756
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 26 April 2007 - 12:50 AM

As far as I understand each one is ran in the sequence that the are presented in your winnt.sif.

Failing that you can name them just like that = command1, command2, cammand3 and so-on...

#8 User is offline   emadhamdy2002 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 25-January 07

Posted 26 April 2007 - 04:19 AM

thnks alot for ur reply it's really greaaaaaaaat forum thnks again
and i hv little ask
i canot make silent programe bt i use wpi to install programe for example
i have winrar.exe and mke silent i made a small cmd file called it rar.cmd put in it

start winrar.exe \s

it work well if i dpl clik on the file directly bt whn i use wpi to open it it give me error and no install happen tell me canot find winrar.exe \s
could u plz help me with the right cmd file to make wpi run winrar silently
?

#9 User is offline   phkninja 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 466
  • Joined: 28-February 05

Posted 26 April 2007 - 07:19 AM

yes you can order them. Firstly create a runonce.bat (or .cmd) file, instead of running the RunOnce from the winnt.sif file. You create an $OEM$ folder and add a cmdlines.txt file that runs the required apps. The easiest is to have

cmdlines.txt
[COMMANDS]
	RUNONCE.CMD


Then you do the following

RunOnce.cmd
REM Do not edit here
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:\CD.txt SET CDROM=%%i:
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REM Program Install code goes here

REG ADD %KEY%01 /VE /D "Preparing Installation..." /f
REG ADD %KEY%01 /V 1 /D "%SystemDrive%\DPsFnshr.exe" /f
REG ADD %KEY%01 /V 2 /D "%WinDir%\INSTALL\START.CMD" /f
REG ADD %KEY%01 /V 3 /D "%WinDir%\INSTALL\ENC.EXE" /f
REG ADD %KEY%01 /V 4 /D "%WinDir%\INSTALL\D.CMD" /f
REG ADD %KEY%01 /V 5 /D "%WinDir%\INSTALL\WPI.CMD" /f


Runs all the required stuff like one application install, or you cold have

RunOnce.cmd
REM Do not edit here
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:\CD.txt SET CDROM=%%i:
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REM Program Install code goes here

REG ADD %KEY%01 /VE /D "Finish Drivers..." /f
REG ADD %KEY%01 /V 1 /D "%SystemDrive%\DPsFnshr.exe" /f

REG ADD %KEY%02 /VE /D "Preparing Installation..." /f
REG ADD %KEY%02 /V 1 /D "%WinDir%\INSTALL\START.CMD" /f

REG ADD %KEY%03 /VE /D "Enc.exe..." /f
REG ADD %KEY%03 /V 1 /D "%WinDir%\INSTALL\ENC.EXE" /f

REG ADD %KEY%04 /VE /D "D.cmd..." /f
REG ADD %KEY%04 /V 1 /D "%WinDir%\INSTALL\D.CMD" /f

REG ADD %KEY%05 /VE /D "WPI.cmd..." /f
REG ADD %KEY%05 /V 1 /D "%WinDir%\INSTALL\WPI.CMD" /f


See the programs go here bit. Copy and paste, then increment the %KEY%\ to 002 etc.

Or just have

cmdlines.txt
[COMMANDS]
	%SystemDrive%\DPsFnshr.exe
	%WinDir%\INSTALL\START.CMD
	%WinDir%\INSTALL\ENC.EXE
	%WinDir%\INSTALL\D.CMD
	%WinDir%\INSTALL\WPI.CMD



there are numerous ways to do the same thing. I would suggest that the DPsFnshr.exe remains in the winnt.sif file and have the rest in the cmdlines.txt etc, as this is essentail for the windows install to function correctly butthe rest are personal preferences. (DPsFnshr.exe is for the Bashrat Driver Packs to install on the machine first)

This post has been edited by phkninja: 26 April 2007 - 07:25 AM


#10 User is offline   emadhamdy2002 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 25-January 07

Posted 26 April 2007 - 07:41 AM

wawwwwwwwo man thnks alot for all that explaintion and putting all codes here thnks agian u r great man thnks again
and plz if u have solution for the next lines plz tell me fast
in sumry i want to silent insatll for winrar from WPI by cmd file
below wht i want
thnks again

View Postemadhamdy2002, on Apr 26 2007, 04:19 AM, said:

thnks alot for ur reply it's really greaaaaaaaat forum thnks again
and i hv little ask
i canot make silent programe bt i use wpi to install programe for example
i have winrar.exe and mke silent i made a small cmd file called it rar.cmd put in it

start winrar.exe \s

it work well if i dpl clik on the file directly bt whn i use wpi to open it it give me error and no install happen tell me canot find winrar.exe \s
could u plz help me with the right cmd file to make wpi run winrar silently
?


#11 User is offline   phkninja 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 466
  • Joined: 28-February 05

Posted 26 April 2007 - 07:54 AM

firstly if you were doing that it would be
start winrar.exe /s

not
start winrar.exe \s


Secondly, using InstallRite its easy to create a silent install. you install the Installrite exe then tell it to monitor the installation of the winrar.exe. then click through the installation. At the end installrite will create a single exe the you call with
winrar.exe /s


#12 User is offline   emadhamdy2002 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 25-January 07

Posted 26 April 2007 - 09:49 AM

thnaks alot man for ur reply i really appreciate ur effort bt also using the code

start winrar.exe /s


whn try excute it by wpi it tell me
canot find winrar.exe

i guess i must put path or certail thing to tell wpi to run the progrme find the folder of the rar.cmd
thnks again man

#13 User is offline   emadhamdy2002 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 25-January 07

Posted 26 April 2007 - 10:29 AM

thnks man i got a solution here the answer


Quote

REM Example, how to look for CDROM-drive. Must have WPI.ico at the root of the CD.
for %%i 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 %%i:\wpi.cmd set CDROM=%%i:
echo Found CD-Rom as drive %CDROM%

REM Determine the WPI startup path.
REM if wpi should run off the cd the replace %~dp0 with %cdrom%.
set installpath=%cdrom%/wpi/Programs/

Rem Program commands to run
start /wait %installpath%\winrar.exe /s

:end


#14 User is offline   phkninja 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 466
  • Joined: 28-February 05

Posted 26 April 2007 - 11:54 AM

just as a matter of intrest, if your using wpi, why are you using

start /wait %installpath%\winrar.exe /s


WPI allows you to add the program as a selecteable product. the above code deosnt use WPI, it installs winrar no matter what.

#15 User is offline   emadhamdy2002 

  • Junior
  • Pip
  • Group: Members
  • Posts: 65
  • Joined: 25-January 07

Posted 27 April 2007 - 03:06 AM

ok thnks alot man for ur reply and adding to me i really appreciate ur help thnks again

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