Jump to content

Issue With Calling Installers From Wpi


Recommended Posts

My WPI is in %cdrom%\$oem$\WPI and all my software to be installed is in %cdrom%\Install

this is my wpi.cmd

@ECHO OFF

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:\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$\wpi

REM Force resolution to needed size for wpi interface.
REM start "%wpipath%\common\VideoChanger.exe" 1280x1024x32@85 -q

REM Font installation - the easy way
for /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 directory
for /F "delims=: tokens=1" %%i in ("%WPIPATH%") DO %%i:
cd %WPIPATH%

REM Start WPI and wait for its end
start /wait WPI.hta

REM call any cleanup code here, or after this script.

exit

:end

This is a sample from my config.js

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

If my cd rom drive is z:\ it will try to run z:\$oem$\wpi\$oem$\install\blahdir\blahsetup.exe

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

Link to comment
Share on other sites


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.

Link to comment
Share on other sites

I really don't think $OEM$ works under %cdrom%.......change it to something like this

%cdrom%\\software\\program\\program.exe

and where is your wpi.cmd at?? Best if called from;

$OEM$\$1\install\wpi.cmd

Well I hope I understand what was going on here, and this helps, if not sorry.........

BD

Link to comment
Share on other sites

I really don't think $OEM$ works under %cdrom%.......change it to something like this

%cdrom%\\software\\program\\program.exe

and where is your wpi.cmd at?? Best if called from;

$OEM$\$1\install\wpi.cmd

Well I hope I understand what was going on here, and this helps, if not sorry.........

BD

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

hmm....mine works perfect, go figure.........

prog[pn]=['<u><font color=#eeeeee">O&O DeFrag 6</font></u&gt]

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&gt]

ordr[pn]=[350]

pn++

REM

REM WPI v3.3.5

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%\PathToWPI

set WPIPATH=%cdrom%\software\wpi

echo WPI will run from %cdrom%

REM Font installation - the easy way

for /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 needed

regedit /S "%cdrom%\software\wpi.reg"

REM Make WPI driectory the current directory

for /F "delims=: tokens=1" %%i in ("%cdrom%\software\wpi") DO %%i:

cd "%cdrom%\software\wpi"

REM Start WPI and wait for its end

start /wait WPI.hta

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 OFF

REM
REM 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" @ /hid

REM Font installation - the smooth and customizable way.
start /wait %wpipath%\common\fonts\fontinstaller.exe

REM 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.vbs
echo Set WshShell = CreateObject("WScript.Shell")>>%tmp%\WPI.vbs
echo 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.vbs
echo if answer = 6 then>>%tmp%\WPI.vbs
echo oExec = WshShell.Run("common\VideoChanger.exe 1280x1024x32@85 -q", 1, true)>>%tmp%\WPI.vbs
echo oExec = WshShell.Run("wpi.hta", 1, true)>>%tmp%\WPI.vbs
echo end if>>%tmp%\WPI.vbs
echo set WshShell = nothing>>%tmp%\WPI.vbs
%tmp%\WPI.vbs
del /q %tmp%\WPI.vbs
REM 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

:end

Here is mine.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...