Jump to content

bingloverld

Member
  • Posts

    18
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    Germany

Posts posted by bingloverld

  1. On 11.9.2016 at 4:31 PM, Tripredacus said:

    It is for Windows 8 OS.

    1. I have never seen stock Windows 7 recovery work on GPT disk.
    2. Windows 10 does not have a recovery image.

    I can post you my EFI diskpart scripts for Win7 and Win10 on monday if you want.

    That would be great! Thank you. 

    I think this 4Kn and size 260MB are specials hdd, we don't use them anyway.

    on 13.09.2016 added:

    PS USB SSD did not wanted to run in UEFI mode because the BOOTX64.EFI file was damaged. I have simply copied this file from DVD with Windows 10 LTSB and it works!

  2. Yes I tooked gpt recommendations directly from Microsoft, gpt.txt is 100% copy/paste. 

    Is this not important for UEFI?

    But you have right we don't use them.

    Do you have antoher idea for select disk 0 (we don't use RAID systems also on CAD-Workstations etc. It is always one hard drive/SSD system) ?

    When I run modified :Choice_4 it works!

  3. Thank you. You have right should be "Laufwerk" :)

    gpt.txt source file:

    select disk 0
    clean
    convert gpt
    create partition primary size=300
    format quick fs=ntfs label="Windows RE tools"
    assign letter="T"
    set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
    gpt attributes=0x8000000000000001
    create partition efi size=100
    format quick fs=fat32 label="System"
    assign letter="S"
    create partition msr size=128
    create partition primary 
    shrink minimum=15000
    format quick fs=ntfs label="Windows"
    assign letter="W"
    create partition primary
    format quick fs=ntfs label="Recovery image"
    assign letter="R"
    set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
    gpt attributes=0x8000000000000001
    list volume
    exit
    

    When I write befhel diskpart /s gpt.txt it woks and I can manually apply my image on W: drive. 

    1. I mean, are all machines in the same EXACT configuration and do all the BIOSes/UEFIs behave the same?
    
    2. Is actually the internal disk the first disk (PhysicalDrive0) on all machines (even when booted from USB)?
    
    3. Is the disk always either "clean" or "partitioned"?
    

    1. We are using only HP PCs and Laptops. What I saw they all behave the same.

    2. Yes, I have not saw that PC or Laptop with intern HDD/SSD was other than disk 0

    3. Yes, we clean alway disk, and then we are making partitions. By gpt you must use "convert gpt" command next to "clean disk"

  4. Ok, I don't know why I become this error (only with dism): "The system cannot find the path specified". 

    PS When I write: dism /Apply-Image /ImageFile:F:\win10.wim /Index:1 /ApplyDir:W:\ (when we take that "wim" is F:)

    Can you please help me with detect for creating wim image second volume name: "windows" as 5th menu option. 

    Thank you!

    PS "My" batch script It looks like this:

    wpeinit
    @ECHO OFF 
    SETLOCAL ENABLEEXTENSIONS
    C: 
    CD\ 
    CLS
    
    :MENU
    
    ECHO ============= Bitte auswaehlen ======================= 
    ECHO ----------------- 
    ECHO 1.  Windows 7 64bit - 29.08.2016
    ECHO ----------------- 
    ECHO 2.  Windows 7 64bit - AutoCAD 
    ECHO ---------------- 
    ECHO 3.  Windows 10 LTSB - mit BIOS
    ECHO ---------------- 
    ECHO 4.  Windows 10 LTSB - mit UEFI
    ECHO ---------------- 
    ECHO ==========Bitte druecken Sie Taste-Q zum Abbrechen========== 
    ECHO.
    
    SET INPUT= 
    SET /P INPUT=Bitte waehlen Sie die Auswahl dannach bitte druecken ENTER: 
    
    IF /I ‘%INPUT%’==’1’ GOTO Selection1 
    IF /I ‘%INPUT%’==’2’ GOTO Selection2 
    IF /I ‘%INPUT%’==’3’ GOTO Selection3 
    IF /I ‘%INPUT%’==’4’ GOTO Selection4 
    IF /I ‘%INPUT%’==’Q’ GOTO Quit 
    CLS
    
    ECHO ============Falsche angabe============ 
    ECHO --------------------------------------- 
    ECHO Bitte wählen Sie die Nummer  
    echo oder druecken Sie Taste-Q zum Abbrechen. 
    ECHO --------------------------------------- 
    ECHO ======Druecken Sie belibiege Taste======
    
    PAUSE > NUL 
    GOTO MENU 
    CLS 
    :Selection1
    SET wimdrive=
    FOR /F "tokens=1,2 " %%A in ('wmic logicaldisk get caption^,VolumeName 2^>NUL') do (
    ECHO %%A %%B
    IF /I "%%B"=="wim" SET wimdrive=%%A
    )
    IF DEFINED wimdrive ECHO Lauferk "wim" wurde gefunden: %wimdrive% &&PAUSE&&GOTO :_doit
    ECHO Lauferk "wim" wurde nicht gefunden :(
    PAUSE
    GOTO :EOF
    
    :_doit
    ECHO Jetzt wird alles automatich gemacht (diskpart, imagex(dism), bcdboot)!
    
    Diskpart /s %wimdrive%\mbr.txt 
    %wimdrive%\Imagex.exe /apply %wimdrive%\win7_64bit_2016.wim 1 C:
    :Quit 
    CLS
    
    C: 
    CD Windows 
    CD Syswow64 
    bcdboot C:\Windows /s S:
    
    ECHO Fertig. Bitte PC neu starten (exit befehl).
    GOTO :EOF
    
    
    :Selection2
    SET wimdrive=
    FOR /F "tokens=1,2 " %%A in ('wmic logicaldisk get caption^,VolumeName 2^>NUL') do (
    ECHO %%A %%B
    IF /I "%%B"=="wim" SET wimdrive=%%A
    )
    IF DEFINED wimdrive ECHO Lauferk "wim" wurde gefunden: %wimdrive% &&PAUSE&&GOTO :_doit2
    ECHO Lauferk "wim" wurde nicht gefunden :(
    PAUSE
    GOTO :EOF
    
    :_doit2
    ECHO Jetzt wird alles automatich gemacht (diskpart, imagex(dism), bcdboot)!
    
    Diskpart /s %wimdrive%\mbr.txt 
    %wimdrive%\Imagex.exe /apply %wimdrive%\win7_64_autocad_07092016.wim 1 C:
    :Quit 
    CLS
    
    C: 
    CD Windows 
    CD Syswow64 
    bcdboot C:\Windows /s S:
    
    ECHO Fertig. Bitte PC neu starten (exit befehl).
    GOTO :EOF
    
    
    
    :Selection3
    SET wimdrive=
    FOR /F "tokens=1,2 " %%A in ('wmic logicaldisk get caption^,VolumeName 2^>NUL') do (
    ECHO %%A %%B
    IF /I "%%B"=="wim" SET wimdrive=%%A
    )
    IF DEFINED wimdrive ECHO Lauferk "wim" wurde gefunden: %wimdrive% &&PAUSE&&GOTO :_doit3
    ECHO Lauferk "wim" wurde nicht gefunden :(
    PAUSE
    GOTO :EOF
    
    :_doit3
    ECHO Jetzt wird alles automatich gemacht (diskpart, imagex(dism), bcdboot)!
    
    Diskpart /s %wimdrive%\mbr.txt 
    dism /Apply-Image /ImageFile:%wimdrive%\win10.wim /Index:1 /ApplyDir:C:\
    :Quit 
    CLS
    
    C: 
    CD Windows 
    CD Syswow64 
    bcdboot C:\Windows /s S: /f ALL
    
    ECHO Fertig. Bitte PC neu starten (exit befehl).
    GOTO :EOF
    
    
    
    :Selection4
    SET wimdrive=
    FOR /F "tokens=1,2 " %%A in ('wmic logicaldisk get caption^,VolumeName 2^>NUL') do (
    ECHO %%A %%B
    IF /I "%%B"=="wim" SET wimdrive=%%A
    )
    IF DEFINED wimdrive ECHO Lauferk "wim" wurde gefunden: %wimdrive% &&PAUSE&&GOTO :_doit4
    ECHO Lauferk "wim" wurde nicht gefunden :(
    PAUSE
    GOTO :EOF
    
    :_doit4
    ECHO Jetzt wird alles automatich gemacht (diskpart, imagex(dism), bcdboot)!
    
    Diskpart /s %wimdrive%\gpt.txt 
    dism /Apply-Image /ImageFile:%wimdrive%\win10.wim /Index:1 /ApplyDir:W:\
    :Quit 
    CLS
    
    W: 
    CD Windows 
    CD Syswow64 
    bcdboot W:\Windows /s S: /f ALL
    
    ECHO Fertig. Bitte PC neu starten (exit befehl).
    GOTO :EOF
    
    
    CLS 
    ECHO ------------------ 
    ECHO =============Druecken Sie belibiege Taste============== 
    ECHO ------------------ 
    
    PAUSE>NUL
    EXIT
  5. Ok, you fave right with redundancy/duplication/waste of storage. I have try change wim image in WinPE with menu:

    @ECHO OFF 
    SETLOCAL ENABLEEXTENSIONS
    C: 
    CD\ 
    CLS
    
    :MENU
    
    ECHO ============= Installeren von Windows ============= 
    ECHO ————————————————– 
    ECHO 1.  Windows 7 64bit - 29.08.2016
    ECHO ————————————————– 
    ECHO 2.  Windows 10 LTSB 
    ECHO ————————————————– 
    ECHO ==========Drücken Q zum abbrechen========== 
    ECHO.
    
    SET INPUT= 
    SET /P INPUT=Bitte wählen Sie die Auswahl
    
    IF /I ‘%INPUT%’==’1’ GOTO Selection1 
    IF /I ‘%INPUT%’==’2’ GOTO Selection2 
    IF /I ‘%INPUT%’==’Q’ GOTO Quit 
    CLS
    
    ECHO ============INVALID INPUT============ 
    ECHO ————————————- 
    ECHO Please select a number from the Main 
    echo Menu [1-2] or select ‘Q’ to quit. 
    ECHO ————————————- 
    ECHO ======PRESS ANY KEY TO CONTINUE======
    
    PAUSE > NUL 
    GOTO MENU 
    CLS 
    :Selection1
    SET wimdrive=
    FOR /F "tokens=1,2 " %%A in ('wmic logicaldisk get caption^,VolumeName 2^>NUL') do (
    ECHO %%A %%B
    IF /I "%%B"=="wim" SET wimdrive=%%A
    )
    IF DEFINED wimdrive ECHO Lauferk mit dem Namen "wim" wurde gefunden: %wimdrive% &&PAUSE&&GOTO :_doit
    ECHO wim-Laufwerk wird nicht erkannt :(
    PAUSE
    GOTO :EOF
    
    :_doit
    ECHO Jetzt wird alles automatich gemacht (diskpart, imagex(dism), bcdboot)!
    
    Diskpart /s %wimdrive%\mbr.txt 
    %wimdrive%\Imagex.exe /apply %wimdrive%\win7_64bit_2016.wim 1 C:
    :Quit 
    CLS
    
    C: 
    CD Windows 
    CD Syswow64 
    bcdboot C:\Windows /s S:
    
    ECHO Fertig. Bitte PC neu starten (exit befehl).
    
    :Selection2
    SET wimdrive=
    FOR /F "tokens=1,2 " %%A in ('wmic logicaldisk get caption^,VolumeName 2^>NUL') do (
    ECHO %%A %%B
    IF /I "%%B"=="wim" SET wimdrive=%%A
    )
    IF DEFINED wimdrive ECHO Lauferk mit dem Namen "wim" wurde gefunden: %wimdrive% &&PAUSE&&GOTO :_doit
    ECHO wim-Laufwerk wird nicht erkannt :(
    PAUSE
    GOTO :EOF
    
    :_doit
    ECHO Jetzt wird alles automatich gemacht (diskpart, imagex(dism), bcdboot)!
    
    Diskpart /s %wimdrive%\gpt.txt 
    dism /Apply-Image /ImageFile:%wimdrive%\win10.wim /Index:1 /ApplyDir:W:\
    :Quit 
    CLS
    
    C: 
    CD Windows 
    CD Syswow64 
    bcdboot W:\Windows /s S: /f ALL
    
    ECHO Fertig. Bitte PC neu starten (exit befehl).
    PAUSE
    :Quit 
    CLS 
    ECHO —————————————————- 
    ECHO =============PRESS ANY KEY TO CONTINUE============== 
    ECHO —————————————————- 
    
    PAUSE 
    EXIT

    But this is not working :(. Can you help me edit this script? Where I have made a mistake? 

    Thank you!

  6. 1) I am sorry that I write not clear.

    two different scripts (and two different PE's) for Windows 7 (BIOS/MBR) and Windows 10 (UEFI/GPT)?

    Yes, this is perfect! 

    Thank you jaclaz!

    2) Can I use dism when wim image of Windows 7 was created with imagex ?

  7. Ok. I have paste this script here als example what I have found on Internet. I am sorry.

    I don't want chose anything. I am making only one Windows installation (one install.wim) per WinPE, also I don't need chose from menu which OS should be installed.

    I need script that make

    diskpart (easy)
    imagex (Windows 7 Enterprise) or dism (Windows 10 Enterprise 2015 LTSB) (here I have problem, with second partition on my USB ssd drive, thats why I need script that als first detect usb drive and second volume name and output this to imagex or dism)
    bcdboot  (easy)

    That's all what I need :)

    I am sorry for misrepresentation.

    Thank you for your time and help!!!

  8. Thank you for your answer. Yes I have forgotten bcdboot, but I have it.

    bcdboot W:\Windows /s S: /f ALL (for Windows 10 PC with UEFI and BIOS)

    and

    bcdboot C:\Windows /s S: (for Windows 7)

    Output from your batch code:

    boot.jpg

  9. I have now modified the so code:

    wpeinit
    @ECHO OFF 
    C: 
    CD\ 
    CLS
    
    :MENU
    
    ECHO ============= Installeren Thin Image ============= 
    ECHO ————————————————– 
    ECHO 1.  Windows 7 64bit installieren  
    ECHO ————————————————– 
    ECHO 2.  Windows 10 LTSB installieren  
    ECHO ————————————————– 
    ECHO ==========Druecke die Taste ‘Q’ zum abbrechen========== 
    ECHO.
    
    SET INPUT= 
    SET /P INPUT=Bitte waehlen Sie Auswahl:
    
    IF /I ‘%INPUT%’==’1’ GOTO Auswahl1 
    IF /I ‘%INPUT%’==’2’ GOTO Auswahl2 
    IF /I ‘%INPUT%’==’Q’ GOTO Quit 
    CLS
    
    ECHO ============INVALID INPUT============ 
    ECHO ————————————- 
    ECHO Please select a number from the Main 
    echo Menu [1-2] or select ‘Q’ to quit. 
    ECHO ————————————- 
    ECHO ======PRESS ANY KEY TO CONTINUE======
    
    PAUSE > NUL 
    GOTO MENU 
    CLS 
    :Auswahl1
    for /F "usebackq tokens=1,2,3,4 " %%i in (`wmic logicaldisk get caption^,description^,VolumeName 2^>NUL`) do (
    
    if %%l equ wim (
    echo %%i is a USB drive. 
            ) 
    Diskpart /s %%i\mbr.txt 
    cd\ 
    %%i\Imagex.exe /apply %%i\win7_64bit_2016.wim 1 C: 
            ) 
    
    
    :Auswahl2
    for /F "usebackq tokens=1,2,3,4 " %%i in (`wmic logicaldisk get caption^,description^,VolumeName 2^>NUL`) do (
    
    if %%l equ wim (
    echo %%i is a USB drive. 
            ) 
    Diskpart /s %%i\gpt.txt 
    cd\ 
    %%i\Imagex.exe /apply %%i\win10.wim 1 C: 
            
            ) 
    
    :Quit 
    CLS 
    ECHO —————————————————- 
    ECHO =============PRESS ANY KEY TO CONTINUE============== 
    ECHO —————————————————- 
    
    PAUSE>NUL 
    EXIT

     but won't work and I don't know why :(. 

  10. Hallo,

    I try to make bootable usb ssd with few windows images for my company. I found somthing like this: http://www.peppercrew.nl/index.php/2015/02/automated-usb-wim-deployment/.

    This would be perfect, but I have wim images that are 20 Gigabyte (fat32 is only for 4GB files). I made two partitions on usb drive one for boot.wim etc and other for other files. Can someone help me with scirpt in startnet.cmd. I have to modify the script so that not only detect usb drive but also the name from volume with wim images and install chosen form menu os. 

    Thank you in advance for your help!

    Bing

    wpeinit 
    @ECHO OFF 
    C: 
    CD\ 
    CLS
    
    :MENU
    
    ECHO ============= Installeren Thin Image ============= 
    ECHO ————————————————– 
    ECHO 1.  Thinclient T5740 
    ECHO ————————————————– 
    ECHO 2.  ThinPC 8200 
    ECHO ————————————————– 
    ECHO ==========PRESS ‘Q’ TO QUIT========== 
    ECHO.
    
    SET INPUT= 
    SET /P INPUT=Please select a number:
    
    IF /I ‘%INPUT%’==’1’ GOTO Selection1 
    IF /I ‘%INPUT%’==’2’ GOTO Selection2 
    IF /I ‘%INPUT%’==’Q’ GOTO Quit 
    CLS
    
    ECHO ============INVALID INPUT============ 
    ECHO ————————————- 
    ECHO Please select a number from the Main 
    echo Menu [1-2] or select ‘Q’ to quit. 
    ECHO ————————————- 
    ECHO ======PRESS ANY KEY TO CONTINUE======
    
    PAUSE > NUL 
    GOTO MENU 
    CLS 
    :Selection1
    for /F "usebackq tokens=1,2,3,4 " %%i in (`wmic logicaldisk get caption^,description^,drivetype 2^>NUL`) do (
    
    if %%l equ 2 ( 
    echo %%i is a USB drive. 
            ) 
    Diskpart /s %%i\diskpart\diskpart.txt 
    cd\ 
    %%i\Imagex.exe /apply %%i\Thinclient\TC.WIM 1 C: 
            ) 
    
    
    :Selection2
    for /F "usebackq tokens=1,2,3,4 " %%i in (`wmic logicaldisk get caption^,description^,drivetype 2^>NUL`) do (
    
    if %%l equ 2 ( 
    echo %%i is a USB drive. 
            ) 
    Diskpart /s %%i\diskpart\diskpart.txt 
    cd\ 
    %%i\Imagex.exe /apply %%i\Thinclient\TC2.WIM 1 C: 
            ) 
    
    :Quit 
    CLS 
    ECHO —————————————————- 
    ECHO =============PRESS ANY KEY TO CONTINUE============== 
    ECHO —————————————————- 
    
    PAUSE>NUL 
    EXIT
×
×
  • Create New...