Kelsenellenelvian Posted April 2, 2005 Posted April 2, 2005 (edited) Okay after a lot of work and some great help I have a command file that gives two boxes one before wpi runs for info and warnings and then one after wpi runs asking if you want to reboot and if you say yes it will automatically reboot.The code reads=@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 + "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 Confirming a reboot...echo Dim WshShell, oExec>%tmp%\WPI.vbsecho Set WshShell = CreateObject("WScript.Shell")>>%tmp%\WPI.vbsecho answer = Msgbox("The installation process has finished. Do you wish to reboot now?",VBYesNo,"Windows Post Installation Wizard")>>%tmp%\WPI.vbsecho if answer = 6 then>>%tmp%\WPI.vbsecho oExec = WshShell.Run("SHUTDOWN -r -t 0", 1, true)>>%tmp%\WPI.vbsecho end if>>%tmp%\WPI.vbsecho set WshShell = nothing>>%tmp%\WPI.vbs%tmp%\WPI.vbsdel /q %tmp%\WPI.vbsexit:endthe messages are easy to customize.SO all of you guys should I change the official version to have this in it??For those of you who may want it I made an .exe file from this and am attaching it here.SMALL ISSUE IN THE CODING OF THE FIRST ONE SORRY NEW ONE IS HERE> Edited April 2, 2005 by kelsenellenelvian
Stalkie Posted April 2, 2005 Posted April 2, 2005 HiI would say that this new version both is complex and breaks the unattended way of usage.An idea could be, to make this a whole new seperate file, and have the autorun run this file, and still have the WPI to work in unattended installs with the original.
Kelsenellenelvian Posted April 2, 2005 Author Posted April 2, 2005 Very excellent point!! you make a good argument for those who use this to run unattended.
djbe Posted April 4, 2005 Posted April 4, 2005 did you get the video res changer to work? or still need help on that?
Kelsenellenelvian Posted April 5, 2005 Author Posted April 5, 2005 Works fine as is I figured it out and the way above works great. I can't thank you enough for your invaluable help with the popup boxes.Thank you.
durex Posted April 12, 2005 Posted April 12, 2005 I agree with these guys' point as well...also, 1 request.... while I understand you enjoy converting your batch files to exe's, please continue to soley use batch files in the official releases of WPI so that those of us who know what there doing can stil make modifications to the script and not have to worry about converting it back from an exe...thanks! and keep up the great work!
Kelsenellenelvian Posted April 12, 2005 Author Posted April 12, 2005 Of course we will keep the cmd file in the official WPI too many people change it to fit their needs.Peersonally I have 2 exe files in mine one for wpi from cd and one for wpi from drive.
durex Posted April 13, 2005 Posted April 13, 2005 Peersonally I have 2 exe files in mine one for wpi from cd and one for wpi from drive.<{POST_SNAPBACK}>btw, not sure if you caught it or not, but I posted up a method of being able to launch wpi, without the need of placing files on your hard drive here if youre interested.
Kelsenellenelvian Posted April 13, 2005 Author Posted April 13, 2005 Interesting but for my personal system (Which I also keep, update and develop WPI on) I use a secondary drive as my main backup feature so for me most of the time WPI is already on the drive. The CD version is for when I am making a house-call or for my peeps.
durex Posted April 13, 2005 Posted April 13, 2005 Ah.. thats actually what I mean to do on my next update of WPI. I have a 2nd storage drive and I keep all of my installers to the progs I use anyway on it, it just makes way more sense to use them directly and keep wpi on that drive too so I can just update it whenever and dont need to worry about burning a new cd.
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