January 17, 200521 yr Is this correct?REM Determine the WPI startup path. REM If WPI should run off the CD the replace %dp0 with %CDROM%\PathToWPIset WPIPATH=%CDROM%\software\WPI\echo WPI will run from %WPIPATH%it worked!!!REM Make WPI driectory the current directoryfor /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO echo %%i:cd "%cdrom%\software\wpi"now to use my Quick Batch Compiler to make this baby totally silent.i hate the Cmd window. hate it!!!
January 17, 200521 yr Author @Astayou got it work with the "ECHO" still in the code, man would not work for me??REM Make WPI driectory the current directoryfor /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO echo %%i:cd "%cdrom%\software\wpi"BD
January 17, 200521 yr bonebaddyhere is my working wpi.exe ... totally silentconverted from my working wpi.cmdfor cd or dvd install onlywith wpi being in cdrom\software\wpi\wpi.rar
January 17, 200521 yr my WPI.CMD start from %SYSTEMDRIVE% and install from CD/DVD@ECHO OFFREMREM WPI startup something.REM REM Example, how to look for CDROM-drive. Must have a file called WIN51 in its root.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:\CD.TEST 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%\PathToWPIset WPIPATH=%CDROM%\INSTALL\WPIecho WPI will run from %WPIPATH%REM Font installation - the easy wayfor /R %%i in ( *.ttf ) do ( echo Installing font %%~ni.ttf copy /Y "%%~fi" "%windir%\Fonts" > nul "%WPIPATH%\common\installfont.exe" "%windir%\Fonts\%%~ni.ttf" > nul)REM Hide this command window"%WPIPATH%\common\cmdow.exe" @ /HIDREM Special registry tweak neededregedit /S "%WPIPATH%\common\wpi.reg"REM Make WPI driectory the current directoryfor /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO %%i:cd "%WPIPATH%"REM Start WPI and wait for its endstart /wait WPI.htaREM call any cleanup code here, or after this script.del /F %SYSTEMDRIVE%\WPI.CMD
January 18, 200521 yr Bonebaddyerrorsfor %%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:\WIN51 set CDROM=%%i:set WPIPATH="%CDROM%\software\WPI\"for /R %%i in ( *.ttf ) do ( copy /Y "%%~fi" "%windir%\Fonts" > nul "%WPIPATH%\common\installfont.exe" "%windir%\Fonts\%%~ni.ttf" > nul)"%WPIPATH%\common\cmdow.exe" @ /HIDfor /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO %%i:cd "%cdrom%\software\wpi"start /wait WPI.htaexitwhat does this dofor /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO %%i:cd "%cdrom%\software\wpi" Edited January 18, 200521 yr by Astalavista
January 18, 200521 yr I got it!for %%i in (C D E F G H I J K L M N O P Q) do if exist %%i:\WIN51 set CDROM=%%i:set WPIPATH=%CDROM%\software999\WPI\for /F "delims=: tokens=1" %%i in ("%cdrom%\software999\wpi") DO echo %%i:cd "%cdrom%\software999\wpi"WPI.htaGuy i forgot to turn on the ghost mode... pls download again.wpi.rar Edited January 18, 200521 yr by Astalavista
January 30, 200521 yr what's the benifit of using the exe compared to the cmd? and for the exe do certain file need to be in any particualar places?
March 24, 200521 yr My WPI is in %cdrom%\$oem$\WPI and all my software to be installed is in %cdrom%\Installthis is my wpi.cmd@ECHO OFFREM Example, how to look for CDROM-drive. Must have a file to identify in its root (like WIN51 or WPI.ico).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:\WIN51 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%\$OEM$\wpi.set wpipath=%cdrom%\$OEM$\wpiREM Force resolution to needed size for wpi interface.REM start "%wpipath%\common\VideoChanger.exe" 1280x1024x32@85 -qREM Font installation - the easy wayfor /R %%i in ( *.ttf ) do ( echo Installing font %%~ni.ttf copy /Y "%%~fi" "%windir%\Fonts" > nul "%WPIPATH%\common\installfont.exe" "%windir%\Fonts\%%~ni.ttf" > nul)REM Special registry tweak needed.regedit /s "%wpipath%\common\wpi.reg"REM Make WPI directory the current directoryfor /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO %%i:cd %WPIPATH%REM Start WPI and wait for its endstart /wait WPI.htaREM call any cleanup code here, or after this script.exit:endThis is a sample from my config.jsprog[pn]=['O&O Defrag v6.5.851 Professional']desc[pn]=['Advanced Defrag Program.']cmd1[pn]=['%cdrom%\\$OEM$\\Install\\O&ODefrag.6.5.851\\O&ODefragProfessionalEdition.msi /QB']regb[pn]=['%cdrom%\\$OEM$\\Install\\O&ODefrag.6.5.851\\def6170.reg']dflt[pn]=['yes']cat[pn]=['System Tools']pn++If my cd rom drive is z:\ it will try to run z:\$oem$\wpi\$oem$\install\blahdir\blahsetup.exei tried all the modifications shown in this thread and i have tried to set the directory to %cdrom% and run %cdrom%\$oem$\wpi\wpi.hta but i get the same error. for some reason no matter how i change my wpi.cmd it gives the same error.
March 25, 200521 yr I am having a hard time trying to make this run from a CD, when i try and start it i get this error:Can anyone help please.ThanksThis is my wip.cmd@ECHO OFFREMREM WPI startup something.REM REM Example, how to look for CDROM-drive. Must have a file called WIN51 in its root.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:\WIN51 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%\PathToWPIset WPIPATH=%CDROM%\install\wpi\WPI.cmdecho WPI will run from %WPIPATH%REM Hide this command window"%CDROM%\install\wpi\common\cmdow.exe" @ /HIDREM Special registry tweak neededregedit /S "%CDROM%\install\wpi\common\wpi.reg"REM Make WPI driectory the current directoryfor /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO echo %%i:cd "%WPIPATH%"REM Start WPI and wait for its endstart /wait WPI.htaREM call any cleanup code here, or after this script.RMDIR /S /Q C:\DPexit:endAnd my WPI.hta<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>Windows Post-Install Wizard</title><META HTTP-EQUIV="MSThemeCompatible" CONTENT="YES"><HTA:APPLICATION ID="oApp" APPLICATIONNAME="wpi" ICON="./wpi.ico" CAPTION="yes" CONTEXTMENU = "yes" INNERBORDER = "no" MAXIMIZEBUTTON = "yes" MINIMIZEBUTTON = "yes" NAVIGABLE = "yes" SCROLL = "no" SCROLLFLAT = "no" SELECTION="no" SHOWINTASKBAR="yes" SINGLEINSTANCE="yes" SYSMENU="yes" VERSION = "3.3" BORDER="none" BORDERSTYLE = "thin" WINDOWSTATE="maximize"><script language="JavaScript1.2" src="./common/main.js" type="text/javascript" APPLICATION="yes"></SCRIPT><script language="JavaScript1.2" src="./wpiscripts/useroptions.js" type="text/javascript" APPLICATION="yes"></SCRIPT> <script language="JavaScript1.2" src="./wpiscripts/api.js" type="text/javascript" APPLICATION="yes"></SCRIPT><script language="JavaScript1.2" src="./wpiscripts/lang.js" type="text/javascript" APPLICATION="yes"></SCRIPT> <script language="JavaScript1.2" src="./wpiscripts/program.js" type="text/javascript" APPLICATION="yes"></SCRIPT> <script language="JavaScript1.2" src="./wpiscripts/config.js" type="text/javascript" APPLICATION="yes"></SCRIPT><script language="JavaScript1.2" src="./wpiscripts/optionswizard.js" type="text/javascript" APPLICATION="yes"></SCRIPT> <script language="JavaScript" src="./wpiscripts/configwizard.js" type="text/javascript" APPLICATION="yes"></script><script language="JavaScript1.2" defer="true" src="./wpiscripts/generate.js" type="text/javascript" APPLICATION="yes"></SCRIPT><script language="JavaScript1.2" src="./wpiscripts/boxes.js" type="text/javascript" APPLICATION="yes"></SCRIPT><script language="JavaScript1.2" src="./wpiscripts/check.js" type="text/javascript" APPLICATION="yes"></SCRIPT> <script language="JavaScript1.2" src="./wpiscripts/timers.js" type="text/javascript" APPLICATION="yes"> </SCRIPT> <script language="javascript"> window.onerror = handleErrors; // or null to suppress error messagefunction handleErrors(msg, url, line){ var errorString = "JavaScript Error Report\n\n"; errorString += " Message: "+msg+"\n"; errorString += " Url: "+url+"\n"; errorString += " File: "+position+"\n"; errorString += " Line: "+line; alert(errorString); return true;}</script><script language="JavaScript1.2"> function onExit(){ position="wpi.hta"; SetScriptWaitTimeout(-1); if (ReallyForce == "yes") CreateFile('exit'); else self.close(); }</SCRIPT><script language="javascript"> position="wpi.hta"; LoadThemedContent();</script></head> </html>
March 25, 200521 yr Author @ donkeydanthat is what this thread is about........incorrectREM Make WPI driectory the current directoryfor /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO echo %%i:cd "%WPIPATH%"correctREM Make WPI driectory the current directoryfor /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO %%i:cd "%WPIPATH%"author left the word ECHO in by accident........bd
April 14, 200521 yr I just use my old SIMPLE code and it works perfectly for me!!!cmdow.exe @ /HID@echo offIF EXIST D:\WIN51 set CDROM=D:IF EXIST E:\WIN51 set CDROM=E:IF EXIST F:\WIN51 set CDROM=F:IF EXIST G:\WIN51 set CDROM=G:IF EXIST H:\WIN51 set CDROM=H:IF EXIST I:\WIN51 set CDROM=I:IF EXIST J:\WIN51 set CDROM=J:IF EXIST K:\Win51 set CDROM=K:%CDROM%cd %CDROM%\Install\WPI\commmon\regedit /S WPI.regcd %CDROM%\Install\WPI\start /wait WPI.htaexit<{POST_SNAPBACK}>This type of layout worked best for me. Thanks!
Create an account or sign in to comment