DragonFire1380 Posted September 12, 2005 Share Posted September 12, 2005 Hello all,I'm trying to seup a cd where the programs are installed from the CD. I really do not care if WPI is ran from the cd or not.My current problem is when XP logs in I get a dos window with the following errors:Found CD-Rom as drive D:'WPIPATH' is not recognized as an internal or external command...blah blahIt then goes on to complain that --start is not a command either.My tree looks like this:I have copied WPI.cmd into $OEM$\$1\InstallHere is my WPI.cmd file, both copies of the file are the same.@ECHO OFFREM 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:\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%.set WPIPATH=%CDROM%\wpi\REM Hide this command window.%wpipath%\Tools\cmdow.exe @ /hidREM Force resolution to needed size for wpi interface.--start %wpipath%\Tools\VideoChanger.exe 1280x1024x32@85 -qREM Font installation - the smooth and customizable way.--start /wait %wpipath%\Tools\fonts\fontinstaller.exeREM Special registry tweak needed.regedit /s "%wpipath%\common\wpi.regREM 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 endstart /wait %windir%\system32\mshta.exe "%CD%\wpi.hta"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 30 -c "To finish installations WPI will now reboot in 30 sec..."exit:endIn generate.js I changed it to this:function FindCDRom(){ position = "generate.js"; var i, li; if (foundCDdrv) return cddrv; li = GetCDRomDriveLetters(); for (i=0; i<li.length; i++) { if (FileExists(li+'\\win51')) { cddrv = li; debug("Found CDROM as drive " + cddrv,1,2); } } if (cddrv=="") { a = fso.GetAbsolutePathName("."); while (a.length>=3) { //debug("Trying ... " + a, 1); if (FileExists(a+'\\win51')) { cddrv=a; debug("Found CDROM as folder " + cddrv,1,2); break; } if (a.length==3) break; a = a + "\\.."; a = fso.GetAbsolutePathName(a);In my WINNT.SIF file I have the following at the bottom:[GuiRunOnce]%systemdrive%\install\wpi.cmdI have read and searched the boards. Which has brought me here. My first problem was WPI kept trying to install my programs from C:\install. After searching around I came up with the above. I'm sure I am missing something really stupid so if someone could please point it out, I would be happier then a pig in sh*t Link to comment Share on other sites More sharing options...
DragonFire1380 Posted September 12, 2005 Author Share Posted September 12, 2005 OK....I think I found my problem, was in wpi.cmdI changed REM Start WPI and wait for its endstart /wait %windir%\system32\mshta.exe "%CD%\wpi.hta"toREM Start WPI and wait for its endstart /wait WPI.hta 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