Swimming_Bird Posted March 25, 2005 Posted March 25, 2005 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.
Kelsenellenelvian Posted March 25, 2005 Posted March 25, 2005 prog[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++Del all of these %cdrom%\\$OEM$\\and try that.
Swimming_Bird Posted March 25, 2005 Author Posted March 25, 2005 i dont see how that would work because my install files are in %cdrom%\$OEM$\Install and wpi runs from %cdrom%\$OEM$\WPIwhile i can change my directory structure i'd rather not if i dont have to.
Kelsenellenelvian Posted March 25, 2005 Posted March 25, 2005 isn't everthing in the %oem dir copied to the source drive during install?If that is do the you need to do the following:REM Determine the WPI startup path. REM if wpi should run off the cd the replace %~dp0 with %cdrom%.set wpipath=%~dp0
Kelsenellenelvian Posted March 25, 2005 Posted March 25, 2005 Also if everyting has been copied to the drive you need to remove the %OEM% entries from config.
Swimming_Bird Posted March 25, 2005 Author Posted March 25, 2005 none of my files are copied over. only things in $oem$\($Docs $Progs $$ $1) are copied to the HDD
Kelsenellenelvian Posted March 25, 2005 Posted March 25, 2005 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$\wpihave you deleted the \%OEM%\wpi part?somehow your files are getting configed twice.
Swimming_Bird Posted March 26, 2005 Author Posted March 26, 2005 i've tried that, and i was wondering how it even passed the %cdrom% or %wpipath% variable on. i didnt think it did. i just need to try and find a way to define %cdrom% propperly within wpi.
Kelsenellenelvian Posted March 26, 2005 Posted March 26, 2005 since the autorun is setting the way it is then replace all instances of %CDROM% with install\ and try that.
bonedaddy Posted March 26, 2005 Posted March 26, 2005 I really don't think $OEM$ works under %cdrom%.......change it to something like this%cdrom%\\software\\program\\program.exeand where is your wpi.cmd at?? Best if called from;$OEM$\$1\install\wpi.cmdWell I hope I understand what was going on here, and this helps, if not sorry.........BD
Swimming_Bird Posted March 26, 2005 Author Posted March 26, 2005 I really don't think $OEM$ works under %cdrom%.......change it to something like this%cdrom%\\software\\program\\program.exeand where is your wpi.cmd at?? Best if called from;$OEM$\$1\install\wpi.cmdWell I hope I understand what was going on here, and this helps, if not sorry.........BD<{POST_SNAPBACK}>i dont see why $oem$ wouldnt work with %cdrom% its just a folder name, and i dont want to run it from the local HDD.
Swimming_Bird Posted March 26, 2005 Author Posted March 26, 2005 after some more tinkering what is happening is that it is treating the %cdrom% variable within the config.js as whichever directory i run my wpi.htm from. the wpi.cmd doesnt seem to have anything to do with it which makes sense because there is nothing that passes the %cdrom% variable to wpi.htm.astalavista i could prolly use your help with this as i have seen that your config.js has %cdrom% in it.thx
bonedaddy Posted March 26, 2005 Posted March 26, 2005 hmm....mine works perfect, go figure.........prog[pn]=['<u><font color=#eeeeee">O&O DeFrag 6</font></u>]desc[pn]=['Hard Disk Defragger not free but very good.']cmd1[pn]=['%cdrom%\\software\\defrag\\oo_defrag.msi /qn']dflt[pn]=['no'] cat[pn]=['<u><font color=#eeeeee">Applications</font></u>]ordr[pn]=[350]pn++REMREM WPI v3.3.5REM 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%\software\wpiecho WPI will run from %cdrom%REM Font installation - the easy wayfor /R %%i in ( *.ttf ) do ( echo Installing font %%~ni.ttf copy /Y "%%~fi" "%windir%\Fonts" > nul "%cdrom%\software\wpi\common\installfont.exe" "%windir%\Fonts\%%~ni.ttf" > nul)REM Special registry tweak neededregedit /S "%cdrom%\software\wpi.reg"REM Make WPI driectory the current directoryfor /F "delims=: tokens=1" %%i in ("%cdrom%\software\wpi") DO %%i:cd "%cdrom%\software\wpi"REM Start WPI and wait for its endstart /wait WPI.hta
Swimming_Bird Posted March 26, 2005 Author Posted March 26, 2005 i still dont see how the %cdrom% variable is passed on, there must be some way in which for yours %cdrom% is defined. for me somehow it is being defined as the directory in which wpi.hta is being run from. regardless of if i rn it through the command script or if i run it directly.
Kelsenellenelvian Posted March 26, 2005 Posted March 26, 2005 prog[pn]=['123 Renamer']uid[pn]=['123RENAMER']desc[pn]=['123 File Renamer help you rename files en masse with a number of possibilities.']ordr[pn]=[5]cmd1[pn]=['%CDROM%\\Install\\123renamersetup2.2.exe /VERYSILENT /SP-']cat[pn]=['Office']pn++@ECHO OFFREMREM WPI startup module.REM REM 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:\wpi.ico 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 wpipath=%CDROM%REM Hide this command window."%wpipath%\common\cmdow.exe" @ /hidREM Font installation - the smooth and customizable way.start /wait %wpipath%\common\fonts\fontinstaller.exeREM Special registry tweak needed.regedit /s "%wpipath%\common\wpi.reg"REM Make WPI directory the current directory.for /f "delims=: tokens=1" %%i in ("%wpipath%") do %%i:cd "%wpipath%"REM Ask if WPI really is wanted to run.echo Dim WshShell, oExec>%tmp%\WPI.vbsecho Set WshShell = CreateObject("WScript.Shell")>>%tmp%\WPI.vbsecho answer = Msgbox("At times during the install process some of the programs will" + vbCRLF + "use the cursor and answer the boxes automatically. So it is" + vbCRLF + "suggested that you start WPI and then leave your PC alone until" + vbCRLF + "the installation process has completed." + vbCRLF + "" + vbCRLF + "Also the screen resolution will be changed to 1280x1024 for the" + vbCRLF + "interface to be displayed properly. You may need to return it to" + vbCRLF + "the settings you prefer when WPI is finished." + vbCRLF + "" + vbCRLF + "When finished WPI will reboot your system." + vbCRLF + "" + vbCRLF + "Do you wish to continue?",VBYesNo,"Windows Post Installation Wizard")>>%tmp%\WPI.vbsecho if answer = 6 then>>%tmp%\WPI.vbsecho oExec = WshShell.Run("common\VideoChanger.exe 1280x1024x32@85 -q", 1, true)>>%tmp%\WPI.vbsecho oExec = WshShell.Run("wpi.hta", 1, true)>>%tmp%\WPI.vbsecho end if>>%tmp%\WPI.vbsecho set WshShell = nothing>>%tmp%\WPI.vbs%tmp%\WPI.vbsdel /q %tmp%\WPI.vbsREM Cleaning up the desktop.del /s/q "%userprofile%\desktop\*.lnk"REM Rebooting the sytem to finalize the installation process.shutdown.exe -r -f -t 10 -c "Reboot in 10 sec..."exit:endHere is mine.
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