cworkman Posted December 2, 2008 Posted December 2, 2008 (edited) Hi Im Tryin To Create A Batch File For A Program and i need help!set w=sC:\WinXP\XPCDTOOLS\miso.exe NULL -mnt 1 "C:\WinXP\WinXP9-in-1.iso" pauseCOPY C:\VRMPVO~1.ISO "C:\WinXP" /Y /V DEL "C:\VRMPVOL_EN.ISO" C:\WinXP\XPCDTOOLS\miso.exe NULL -mnt 1 "C:\WinXP\VRMPVO~1.ISO" for /d %x in ( A B 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 %x:\WIN51IP.SP2 set w=%x XCOPY %w%:\ "C:\WinXP\XPCD" /Y /H /Ebut when i click on the install.bat the command prompt window pops up but close'swhat am i doin wrong? Edited December 2, 2008 by cworkman
NIM Posted December 2, 2008 Posted December 2, 2008 Hi Im Tryin To Create A Batch File For A Program and i need help!set w=sC:\WinXP\XPCDTOOLS\miso.exe NULL -mnt 1 "C:\WinXP\WinXP9-in-1.iso" pauseCOPY C:\VRMPVO~1.ISO "C:\WinXP" /Y /V DEL "C:\VRMPVOL_EN.ISO" C:\WinXP\XPCDTOOLS\miso.exe NULL -mnt 1 "C:\WinXP\VRMPVO~1.ISO" for /d %x in ( A B 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 %x:\WIN51IP.SP2 set w=%x XCOPY %w%:\ "C:\WinXP\XPCD" /Y /H /Ebut when i click on the install.bat the command prompt window pops up but close'swhat am i doin wrong?You can see where you did wrong by opening command prompt window and dragging this script inside the window+enter to run it. Then your window will stay opened and you would be able to see which command you did wrong.
cworkman Posted December 2, 2008 Author Posted December 2, 2008 it Works Fine If I Do It Like That it Just Won't Let My Execute the code from install.bat
NIM Posted December 2, 2008 Posted December 2, 2008 it Works Fine If I Do It Like That it Just Won't Let My Execute the code from install.batI asked my colleague now and he says that you should define the "start in" folder to run the script. That could be the problem, but he's not positive.
cworkman Posted December 2, 2008 Author Posted December 2, 2008 I asked my colleague now and he says that you should define the "start in" folder to run the script. That could be the problem, but he's not positive.ok first of all i change the code@ECHO OFFC:\WinXP\XPCDTOOLS\miso.exe NULL -mnt 1 "C:\WinXP\WinXP9-in-1.iso"ECHO.ECHO STEP 1: In The Window That Pops Up Click Create Windows XP CD ImagesECHO.ECHO STEP 2: Click Create Windows XP Professional CD ImageECHO.ECHO STEP 3: Click Windows XP Professional Corporate CD IMageECHO.ECHO STEP 4: Click ExitECHO.pauseECHO.C:\WinXP\XPCDTOOLS\miso.exe NULL -umnt 1ECHO.ECHO Copying New ISO To Working AreaCOPY C:\VRMPVO~1.ISO "C:\WinXP" /Y /VECHO.ECHO Deleting New ISO From TEMP StorageDEL "C:\VRMPVOL_EN.ISO"pauseECHO.ECHO Mounting Windows XP Professional Corp ISO;C:\WinXP\XPCDTOOLS\miso.exe NULL -mnt 1 "C:\WinXP\VRMPVO~1.ISO"pauseset w=sECHO.ECHO Copying Searching For XP Pro Crop Setup Filesfor /d %x in ( A B 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 %x:\WIN51IP.SP2 set w=%xECHO.pauseECHO.ECHO Copying XP Pro Crop Setup Files To C:\WinXP\XPCDXCOPY %w%:\ "C:\WinXP\XPCD" /Y /H /EpauseECHO.C:\WinXP\XPCDTOOLS\miso.exe NULL -umnt 12nd i used quick batch file compiler and it seems to screw up on Line Offor /d %x in ( A B 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 %x:\WIN51IP.SP2 set w=%xso why is it workin when i copy and paste it into the command prompt window but not when i use the install.bat
cworkman Posted December 2, 2008 Author Posted December 2, 2008 ok i got it workingfor /d %x in ( A B 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 %x:\WIN51IP.SP2 set w=%x Should Befor /d %%x in ( A B 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 %%x:\WIN51IP.SP2 set w=%%x When Executing it in a batch file!
Mr_Smartepants Posted December 2, 2008 Posted December 2, 2008 (edited) Well, you haven't really explained what you want to do. I assume you want to mount an ISO (with multiple ISO files), then copy an ISO to C:\, then mount it, then copy the contents of that ISO to C:\WinXP\XPCDAm I right?First, you haven't declared your mount-point.See: http://www.magiciso.com/tutorials/miso-mount-iso-image.htmmiso.exe NULL -mnt j: "c:\backup\1.uif"mount "c:\backup\1.uif" to virtual drive j:Please notes: miso.exe ignores the "NULL" parameters.Change drive 'X:' to whatever UNUSED drive letter you want (Never use A, B, or C).@echo offIF not EXIST "C:\WinXP\XPCDTOOLS\miso.exe" GOTO errorIF not EXIST "C:\WinXP\WinXP9-in-1.iso" GOTO errorecho Mounting ISO to drive XC:\WinXP\XPCDTOOLS\miso.exe NULL -mnt X: "C:\WinXP\WinXP9-in-1.iso" echo Copying source ISOCOPY "X:\VRMPVOL_EN.ISO" "C:\WinXP\ISO\*" /Y /V C:\WinXP\XPCDTOOLS\miso.exe NULL -umnt 1echo Mounting ISOIF not EXIST "C:\WinXP\ISO\VRMPVOL_EN.ISO" GOTO errorC:\WinXP\XPCDTOOLS\miso.exe NULL -mnt X: "C:\WinXP\ISO\VRMPVOL_EN.ISO" for %%a in (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 %%a:\WIN51 set ISO=%%aecho Copying filesXCOPY %ISO%:\* "C:\WinXP\XPCD\*" /Y /H /EC:\WinXP\XPCDTOOLS\miso.exe NULL -umnt 1:ENDEND:ERRORecho Cannot find filespausegoto endTo see what the code is doing, remove the "@echo off"*Edit, We cross-posted. Glad to see you got it working. My code adds more failsafes and cleans up after itself (unmounts drives). Edited December 2, 2008 by Mr_Smartepants
cworkman Posted December 2, 2008 Author Posted December 2, 2008 (edited) Well, you haven't really explained what you want to do. I assume you want to mount an ISO (with multiple ISO files), then copy an ISO to C:\, then mount it, then copy the contents of that ISO to C:\WinXP\XPCDAm I right?First, you haven't declared your mount-point.See: http://www.magiciso.com/tutorials/miso-mount-iso-image.htmChange drive 'X:' to whatever UNUSED drive letter you want (Never use A, B, or C).@echo off IF not EXIST "C:\WinXP\XPCDTOOLS\miso.exe" GOTO error IF not EXIST "C:\WinXP\WinXP9-in-1.iso" GOTO error echo Mounting ISO to drive X C:\WinXP\XPCDTOOLS\miso.exe NULL -mnt X: "C:\WinXP\WinXP9-in-1.iso" echo Copying source ISO COPY "X:\VRMPVOL_EN.ISO" "C:\WinXP\ISO\*" /Y /V C:\WinXP\XPCDTOOLS\miso.exe NULL -umnt 1 echo Mounting ISO IF not EXIST "C:\WinXP\ISO\VRMPVOL_EN.ISO" GOTO error C:\WinXP\XPCDTOOLS\miso.exe NULL -mnt X: "C:\WinXP\ISO\VRMPVOL_EN.ISO" for %%a in (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 %%a:\WIN51 set ISO=%%a echo Copying files XCOPY %ISO%:\* "C:\WinXP\XPCD\*" /Y /H /E C:\WinXP\XPCDTOOLS\miso.exe NULL -umnt 1 :END END :ERROR echo Cannot find files pause goto endTo see what the code is doing, remove the "@echo off"Well I Downloaded A 9-IN-1 XPCD From A Torrent Site And I Need The XP PRO Version! So I Wanted To Make A Batch File That Would Mount The 9in1 ISO then with CDIMAGE Make An XP PRO ISO! Then Move That ISO To The WinXP Folder Unmount The 9-in-1! Then Mount The XP PRO ISO Copy All Files And Folders To The WinXP\XPCD Unmount The XP PRO ISO That Way I Can Integrate SP3! And Add My Own Genuine Product Key! Yes I Own XP Pro! My CD Broke! To Many Scratch'sC:\WinXP\XPCDTOOLS\miso.exe NULL -mnt 1 "C:\WinXP\WinXP9-in-1.iso" (This Mouts The 9-in-1 ISO To Virtual Drive 1)C:\WinXP\XPCDTOOLS\miso.exe NULL -umnt 1 (This Unmounts The 9-in-1 ISO)COPY C:\VRMPVO~1.ISO "C:\WinXP" /Y /V (Copies XP PRO ISO To C:\WinXP)DEL "C:\VRMPVOL_EN.ISO" (Deletes The XP PRO ISO From C:\)C:\WinXP\XPCDTOOLS\miso.exe NULL -mnt 1 "C:\WinXP\VRMPVO~1.ISO" (Mounts The XP PRO ISO)set w=sfor /d %x in ( A B 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 %x:\WIN51IP.SP2 set w=%x (SCANS For Certain Files To Get Drive Leter Of The Virtual Drive)XCOPY %w%:\ "C:\WinXP\XPCD" /Y /H /E (Copies All Files And Folders To C:\WinXP\XPCD)C:\WinXP\XPCDTOOLS\miso.exe NULL -umnt 1 (UnMounts XP PRO ISO) Edited December 2, 2008 by cworkman
SenHu Posted December 20, 2009 Posted December 20, 2009 This will probably be easier to do with biterscripting ( http://www.biterscripting.com ) than batch - it will be more flexible to program things of this nature.I am not sure I understand the requirements completely, so can't post a script yet.
Kelsenellenelvian Posted December 20, 2009 Posted December 20, 2009 Warez discussion can not be tolerated here.../closedany further discussion will result in official warnings!
Recommended Posts