Jump to content

Help Compiling Cmd File. Please


Recommended Posts

Okay here is my prob evertime I try to compil my cmd file the exe looks for my temp folder not the wpi folder. Can some one make 2 exe files for me?

Or explain what I am doing wrong.

#1=

@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 Force resolution to needed size for wpi interface.
start /wait %wpipath%\common\VideoChanger.exe 1280x1024x32@85 -q

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

REM Hide this command window
"%wpipath%\common\cmdow.exe" @ /hid

REM Special registry tweak needed
regedit /s "%wpipath%\common\wpi.reg"

REM Make WPI driectory the current directory
for /f "delims=: tokens=1" %%i in ("%wpipath%") do %%i:
cd "%wpipath%"

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

REM Cleaning up the desktop.
del /s/q "%systemdrive%\documents and settings\%username%\desktop\*.lnk"

REM Performing a reboot to finalize installation.
shutdown.exe -r -f -t 10 -c "Reboot in 10 sec..."

exit

:end

#2=

@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=%~dp0

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

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

REM Hide this command window
"%wpipath%\common\cmdow.exe" @ /hid

REM Special registry tweak needed
regedit /s "%wpipath%\common\wpi.reg"

REM Make WPI driectory the current directory
for /f "delims=: tokens=1" %%i in ("%wpipath%") do %%i:
cd "%wpipath%"

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

REM Cleaning up the desktop.
del /s/q "%systemdrive%\documents and settings\%username%\desktop\*.lnk"

exit

:end

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