mardi 22 mai 2018

can't start ghost using IF in one command

I am trying to make a automatic imaging flash drive I've made an winpe 10 flash drive with wmic scripting installed on it and now i want to directly open ghost including switch possibilities the problem is that it starts winpe and than it reboots the test model is: HP EliteOne 800 G3 23.8-in Non-Touch AiO

This is what i got so far:

@echo off
for /f "tokens=* delims==" %%a in (
    'wmic computersystem get model /value'
) do for /f "delims=" %%b in ("%%~a") do (
echo %%b
pause
    if /i "%%~b"=="Model=HP EliteOne 800 G1 AiO" start "" "ghost64 -clone,mode=load,src=F:\images\g800-3.GHO,dst=2 -sure -batch"
    if /i "%%~b"=="Model=HP EliteOne 800 G2 23-in Non-Touch AiO" start "" "ghost64 -clone,mode=load,src=F:\images\g800-3.GHO,dst=2 -sure -batch"
    if /i "%%~b"=="Model=HP EliteOne 800 G3 23.8-in Non-Touch AiO" start "" "ghost64 -clone,mode=load,src=F:\images\g800-3.GHO,dst=2 -sure -batch"
    if /i "%%~b"=="Model=HP Probook 470 G2"
    if /i "%%~b"=="Model=HP ProDesk 600 G1 DM"
    if /i "%%~b"=="Model=HP EliteDesk 800 G1 USDT"
    if /i "%%~b"=="Model=HP t630 Thin Client"
    if /i "%%~b"=="Model=HP t620 Thin Client"
    if /i "%%~b"=="Model=hp t5740"
)
:nomodel 

Aucun commentaire:

Enregistrer un commentaire