siritalia Posted August 7, 2012 Share Posted August 7, 2012 Hi all,Just wondering if someone can help me or point me in the right direction. I have the below script which runs fine untill it hits the image_IT part then comes up unable to open file........exiting script in five seconds.Then the rest of the script displays and the laptop reboots with no image been applied. All I need it to do is search the external HDD for the image file and apply it. I have also included a file i have created but not sure if it is required.CLS@ECHO OFFset blankLine=-ECHO Please select the image below...ECHO 1 - HP 8440PECHO 2 - HP 8000ECHO 3 - DELL D630ECHO 4 - OTHER IMAGEecho %blankLine%SET /P selectOpt=Please select a option from above: echo %blankLine%IF %selectOpt% == 1 goto :opt1IF %selectOpt% == 2 goto :opt2IF %selectOpt% == 3 goto :opt3IF %selectOpt% == 4 goto :opt4exitREM ---------------------------------REM here for opt1REM ---------------------------------:opt1wpeinit@echo offtype clean_disk.txtpausediskpart /s clean.txtrem type image.txtimage_it.exerem imagex /apply %location%:HP 8440P.wim 1 c:type done.txtexitREM ---------------------------------REM here for opt2REM ---------------------------------:opt2wpeinit@echo offtype clean_disk.txtpausediskpart /s clean.txtrem type image.txtimage_it.exerem imagex /apply %location%:HP 8000.wim 1 c:type done.txtexitREM ---------------------------------REM here for opt3REM ---------------------------------:opt3wpeinit@echo offtype clean_disk.txtpausediskpart /s clean.txtrem type image.txtimage_it.exerem imagex /apply %location%:DELL D630.wim 1 c:type done.txtexitREM ---------------------------------REM here for opt4REM ---------------------------------:opt4wpeinit@echo offtype clean_disk.txtpausediskpart /s clean.txtrem type image.txtimage_it.exerem imagex /apply %location%:OTHER IMAGE.wim 1 c:type done.txtexit Link to comment Share on other sites More sharing options...
Tripredacus Posted August 7, 2012 Share Posted August 7, 2012 Boot into your WinPE, and get to a CMD. Then try to run image_it.exe manually. I wouldn't be surprised if you either have an architecture mismatch or are missing a dependency. Link to comment Share on other sites More sharing options...
jaclaz Posted August 7, 2012 Share Posted August 7, 2012 (edited) May I ask WHAT is image_it.exe? Whatever it is, it is "strange" that is run in the same way (with no parameters) in each of the available options ....jaclaz Edited August 7, 2012 by jaclaz Link to comment Share on other sites More sharing options...
siritalia Posted August 7, 2012 Author Share Posted August 7, 2012 (edited) Hi guys,So i have changed the script now to not use IMAGE_IT. No more but how do I get it to choose the USB drive as at present I have to have the dvd in the drive to apply the image:wpeinitCLS@ECHO OFFset blankLine=-ECHO Please select the image below...ECHO 1 - HP 8440PECHO 2 - HP 8000ECHO 3 - DELL D630ECHO 4 - OTHER IMAGEecho %blankLine%SET /P selectOpt=Please select a option from above: echo %blankLine%IF %selectOpt% == 1 goto :opt1IF %selectOpt% == 2 goto :opt2IF %selectOpt% == 3 goto :opt3IF %selectOpt% == 4 goto :opt4exitREM ---------------------------------REM here for opt1REM ---------------------------------:opt1wpeinit@echo offtype clean_disk.txtpausediskpart /s clean.txtrem type image.txtimagex /apply d:\HP 8440P.wim 1 c:\type done.txtpauseexitREM ---------------------------------REM here for opt2REM ---------------------------------:opt2wpeinit@echo offtype clean_disk.txtpausediskpart /s clean.txtrem type image.txtimagex /apply d:\HP 8000.wim 1 c:\type done.txtpauseexitREM ---------------------------------REM here for opt3REM ---------------------------------:opt3wpeinit@echo offtype clean_disk.txtpausediskpart /s clean.txtrem type image.txtimagex /apply d:\DELL D630.wim 1 c:\type done.txtpauseexitREM ---------------------------------REM here for opt4REM ---------------------------------:opt4wpeinit@echo offtype clean_disk.txtpausediskpart /s clean.txtrem type image.txtimagex /apply d:\OTHER IMAGE.wim 1 c:\type done.txtpauseexit Edited August 8, 2012 by siritalia Link to comment Share on other sites More sharing options...
Tripredacus Posted August 8, 2012 Share Posted August 8, 2012 So you need to (beside start using code tags and get rid of that extra space) is to find where the image is kept. You can do it with WMI, but many people cheap out and just search all drive letters for a matching path. Example:cmd /c 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\wpi.exe start %i:\wpi\wpi.exesource: But I do not know if you can read from WMI directly with a .cmd in WinPE (does wmic work?) without using a scripting or programming language. 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