I tried it today.
Flash Bios via BAT. Np
Flash Android via *.nsh. Np
Flashing WIn 10 (as i heard, it s the 64x Version), big Problems.
1. --> need to press any Key to continue. Solved it buy editing the *.cmd file.
But now, it does what the Batchfile says, it does but it just doesnt keep any Data. If i unplug the bootable USB Stick, only Android is visible on the Udalscreen. If I dont, it keeps running over the same *.cmd Commands / Files.
Anybody has a solutiont? Attached to Main.com code...
"
@ECHO This script is for CHT Win10 DualOS install windows usage
@ECHO ==================== File Version V3.2.0.4 ====================
@ECHO Hoonghui.Li@emdoor.com @ECHO ------------2015-12-28
@Echo. @ECHO off
@Rem This script is called by x:\Windows\System32\Startnet.cmd - WinPE
@Echo. @Echo. @Echo. @ECHO Running Intel Optimization powercfg for improved imaging times
@Echo. @ECHO call powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
call powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
@Echo. @Echo. @Rem @Rem This is the default product key being used:
set productkey=37GNV-YCQVD-38XP9-T848R-FC2HD
@Rem @Rem Home/Core: 37GNV-YCQVD-38XP9-T848R-FC2HD
@Rem Pro: NF6HC-QH89W-F8WYV-WWXV4-WFG6P
@Rem Enterprise: GN7FR-4QK4T-8XPDY-P2RYF-QGP4G
@Echo. @Rem *****************************************************************
@Rem List all the disks, then search the volumes of each one to see
@Rem which disks may have "Winpe" in the label. We will ignore that
@Rem disk and use the first disk without the Winpe label that we find.
@Rem *****************************************************************
@Echo.>x:\listdisk.txt
@ECHO list disk>>x:\listdisk.txt
@ECHO exit>>x:\listdisk.txt
echo x:\listdisk.txt
@ECHO call diskpart /s x:\listdisk.txt
call diskpart /s x:\listdisk.txt>x:\Disks.txt
@Echo. @Rem Set Disk equal to blank to start
set disk=
@Echo. @Rem @Rem This line will write a diskpart script to select the disk and detail it's contents.
@Rem We use this output to find a disk that does NOT have Winpe as the volume label.
@Rem That disk will have the OS installed to it. This way you can exclude USB from diskpart.
@Rem @Rem This works around the issue where the USB key is sometimes enumerated as disk 0 and the
@Rem SSD is disk 1.
@Rem
for /f "skip=8 tokens=2" %%A in (x:\Disks.txt) do (
@ECHO sel disk %%A>x:\Par.txt
@ECHO det disk>>x:\Par.txt
@ECHO exit>>x:\Par.txt
if NOT "%%A"=="DiskPart..." call :ListPar %%A
)
if "%Disk%"=="" echo No disk found without a volume label of "Winpe"&& set disk=0
@ECHO Using Disk "%Disk%"
@Echo. @Echo. @Echo. @Rem *****************************************************************
@Rem Detect if System is booted into UEFI mode or Bios mode
@Rem *****************************************************************
for /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') do set Firmware=%%B
@Echo.
if %Firmware%==0x1 goto :Biosmode
if %Firmware%==0x2 goto :UEFImode
Goto :END
:UEFImode
@Echo. @Rem ************************
@Rem UEFI SECTION
@Rem ************************
@ECHO The PC is booted in UEFI mode
@ECHO ==== honghui Fix for the dualOS usage 20150722====
rem call 01_Del_Wind_Par.bat
@ECHO ============================ Step 1.0B LHH Del the before windows Partion for dual OS ===============
@Echo.>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO select disk "%Disk%">>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO sel partition 12>>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO del partition override>>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO sel partition 13>>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO del partition override>>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO sel partition 14>>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO del partition override>>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO sel partition 15>>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO del partition override>>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO list volume>>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO exit>>x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO ============================ Step 1.D Type the disk part configuration ===============
type x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO ============================ Step 1.1A clear before partitions============================
@Echo. @Echo. @ECHO *****************************************************************
@ECHO Setting up the partition table
@ECHO *****************************************************************
@ECHO call diskpart /s x:\CreatePartitions-UEFI-honghui-del.txt
diskpart /s x:\CreatePartitions-UEFI-honghui-del.txt
@ECHO ============================ Step 2. LHH hide the android Partion for dual OS ===============
rem call 02_HideAndroid.bat
@Echo.>x:\Android_Partition_Hidden_LHH.txt
@ECHO select disk "%Disk%">>x:\Android_Partition_Hidden_LHH.txt
@ECHO select volume "0">>x:\Android_Partition_Hidden_LHH.txt
@ECHO attributes volume set hidden>>x:\Android_Partition_Hidden_LHH.txt
@ECHO exit>>x:\Android_Partition_Hidden_LHH.txt
@ECHO honghui ------pause
type x:\Android_Partition_Hidden_LHH.txt
@ECHO call diskpart /s x:\Android_Partition_Hidden_LHH.txt
call diskpart /s x:\Android_Partition_Hidden_LHH.txt
@Echo.>x:\winpart.txt
@ECHO select disk "%Disk%">>x:\winpart.txt
rem
@ECHO clean>>x:\winpart.txt
rem
@ECHO convert gpt>>x:\winpart.txt
@ECHO create partition efi size=100>>x:\winpart.txt
@ECHO format quick fs=fat32 label="System">>x:\winpart.txt
@ECHO assign letter="S">>x:\winpart.txt
@ECHO create partition msr size=16>>x:\winpart.txt
@ECHO create partition primary>>x:\winpart.txt
@ECHO format quick fs=ntfs label="Windows">>x:\winpart.txt
@ECHO assign letter="W">>x:\winpart.txt
@ECHO shrink desired=800>>x:\winpart.txt
@ECHO create partition primary>>x:\winpart.txt
@ECHO format quick fs=ntfs label="Recovery">>x:\winpart.txt
@ECHO assign letter="R">>x:\winpart.txt
@ECHO set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac">>x:\winpart.txt
@ECHO gpt attributes=0x8000000000000001>>x:\winpart.txt
@ECHO exit>>x:\WinPart.txt
Goto :WINPARTSECTION
:Biosmode
@Rem ************************
@Rem BIOS SECTION
@Rem ************************
@ECHO The PC is booted in BIOS mode
@ECHO The PC is booted in BIOS mode>x:\Bios.txt
@Echo.>x:\winpart.txt
@ECHO select disk "%Disk%">>x:\winpart.txt
@ECHO clean>>x:\winpart.txt
@ECHO create partition primary size=100>>x:\winpart.txt
@ECHO active>>x:\winpart.txt
@ECHO format quick fs=fat32 label="System">>x:\winpart.txt
@ECHO assign letter="S">>x:\winpart.txt
@ECHO create partition primary>>x:\winpart.txt
@ECHO format quick fs=ntfs label="Windows">>x:\winpart.txt
@ECHO assign letter="W">>x:\winpart.txt
@ECHO exit>>x:\winpart.txt
@Echo.
:WINPARTSECTION
@ECHO Winpart.txt now contains.....
@Echo.
type x:\winpart.txt
@Echo. @Echo. @ECHO *****************************************************************
@ECHO Setting up the partition table
@ECHO *****************************************************************
@ECHO call diskpart /s x:\winpart.txt
diskpart /s x:\winpart.txt
@Echo. @Echo. @ECHO *****************************************************************
@Rem Map drive letter for Install.wim
@ECHO *****************************************************************
@Echo.>x:\ListVol.txt
@ECHO List volume>>x:\ListVol.txt
@ECHO exit>>x:\ListVol.txt
@ECHO call diskpart /s x:\ListVol.txt
call diskpart /s x:\ListVol.txt>x:\Output.txt
@Echo. @Echo. @Rem Go through each drive letter, looking for the images\Install.txt file
for /f "skip=8 tokens=3" %%A in (x:\Output.txt) do (
if exist %%A:\images\install.txt set InstallPath=%%A:\images&& echo "Found device with images folder and install.txt file"
)
@Echo. @Echo. @Rem Check InstallPath was found and there are images in it.
if NOT EXIST %InstallPath%\Install.wim echo "Install.wim NOT found." && goto :Error
@ECHO Install.wim FOUND at %InstallPath%\images\install.wim
@Echo. @Echo. @ECHO Making directories...
md w:\recycler\scratch
if %errorlevel% NEQ 0 echo "Failed to make w:\recycler\scratch directory" && goto :error
@Echo.
md r:\recovery\windowsre
if %errorlevel% NEQ 0 echo "Failed to make m:\recovery\windowsre directory" && goto :error
@Echo. @ECHO *****************************************************************
@ECHO Applying the Windows image from the USB
@ECHO *****************************************************************
@ECHO call DISM /Apply-Image /ImageFile:%InstallPath%\install.wim /Index:1 /ApplyDir:w:\ /Compact /ScratchDir:w:\recycler\SCRATCH
call DISM /Apply-Image /ImageFile:%InstallPath%\install.wim /Index:1 /ApplyDir:w:\ /Compact /ScratchDir:w:\recycler\SCRATCH
if %errorlevel% NEQ 0 echo "Failed to apply image to w:" && goto :error
@Echo. @Echo. @Echo. @ECHO *****************************************************************
@ECHO Add default product key
@ECHO *****************************************************************
@ECHO call DISM /Image:w: /Set-ProductKey:%productkey%
call DISM /Image:w: /Set-ProductKey:%productkey%
if %errorlevel% NEQ 0 echo "Failed to set productkey." && goto :error
@Echo. @Echo. @Echo. @ECHO *****************************************************************
@Rem Move WinRE to Recovery Partition
@ECHO *****************************************************************
@Echo. @ECHO Modifying attributes of winre.wim so we can move it.
attrib w:\Windows\System32\recovery\winre.wim -s -h -a -r
@ECHO move w:\Windows\System32\recovery\winre.wim r:\recovery\windowsre
move w:\Windows\System32\recovery\winre.wim r:\recovery\windowsre
if %errorlevel% NEQ 0 echo "Failed to move winre.wim to r:\recovery\windowsre" && goto :error
@Echo. @ECHO reset attributes now
attrib r:\Recovery\Windowsre\winre.wim +s +h +a +r
@Echo. @Echo. @ECHO *****************************************************************
@ECHO Setting the boot environment
@ECHO *****************************************************************
@ECHO call w:\WINDOWS\SYSTEM32\BCDBOOT w:\WINDOWS /s s: /f all
w:\WINDOWS\SYSTEM32\BCDBOOT w:\WINDOWS /s s: /f all
if %errorlevel% NEQ 0 echo "Failed to set boot information" && goto :error
@Echo. @Echo. @Echo. @ECHO *****************************************************************
@ECHO Setting the recovery environment
@ECHO *****************************************************************
@ECHO w:\windows\system32\reagentc /SetREImage /Path r:\RECOVERY\WINDOWSRE /target w:\windows
w:\windows\system32\reagentc /SetREImage /Path r:\RECOVERY\WINDOWSRE /target w:\windows
if %errorlevel% NEQ 0 echo "Failed to set recovery information" && goto :error
@Echo. @Echo. @Echo. @ECHO *****************************************************************
@ECHO Copying over Unattend.xml to use on factory floor if it exists
@ECHO *****************************************************************
@ECHO if EXIST %WinPESource%Scripts\Unattend.xml copy %WinPESource%Scripts\Unattend.xml w:\Windows\Panther /y
if EXIST %WinPESource%Scripts\Unattend.xml copy %WinPESource%Scripts\Unattend.xml w:\Windows\Panther /y
@Echo. @ECHO *****************************************************************
@ECHO Copying over NON Scanstate Packages, if they exist.
@ECHO IF YOU COPY OVER SCANSTATE PPKG, THIS CAUSE IMAGE TO FAIL DURING RECOVERY
@ECHO *****************************************************************
@ECHO if EXIST %WinPESource%Scripts\*.ppkg copy %WinPESource%Scripts\*.ppkg r:\Recovery\Customizations /y
if EXIST %WinPESource%Scripts\*.ppkg copy %WinPESource%Scripts\*.ppkg r:\Recovery\Customizations /y
@Echo. @ECHO *****************************************************************
@ECHO Copying over resetconfig.xml and assets, if they exist.
@ECHO *****************************************************************
@ECHO if EXIST %WinPESource%Scripts\Recovery\OEM\resetconfig.xml xcopy %WinPESource%Scripts\Recovery\*.* w:\Recovery /e /y
if EXIST %WinPESource%Scripts\Recovery\OEM\resetconfig.xml xcopy %WinPESource%Scripts\Recovery\*.* w:\Recovery /e /y
@Echo. @Echo. @ECHO *****************************************************************
@ECHO Copying over resetconfig.xml and assets, if they exist.
@ECHO *****************************************************************
@ECHO if EXIST %WinPESource%Scripts\LayoutModification.xml copy %WinPESource%Scripts\LayoutModification.xml w:\users\default\appdata\local\Microsoft\Windows\Shell\ /y
if EXIST %WinPESource%Scripts\LayoutModification.xml copy %WinPESource%Scripts\LayoutModification.xml w:\users\default\appdata\local\Microsoft\Windows\Shell\ /y
@Echo. @Echo. @ECHO *****************************************************************
@ECHO Trying to edit Registry for desktop Icons.
@ECHO *****************************************************************
reg load HKU\DEFAULTTEMP w:\users\default\ntuser.dat
reg add HKU\DEFAULTTEMP\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /v {20D04FE0-3AEA-1069-A2D8-08002B30309D} /d 00000000 /t REG_DWORD /f
reg add HKU\DEFAULTTEMP\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /v {59031a47-3f72-44a7-89c5-5595fe6b30ee} /d 00000000 /t REG_DWORD /f
reg add HKU\DEFAULTTEMP\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel /v {F02C1A0D-BE21-4350-88B0-7367FC96EF3C} /d 00000000 /t REG_DWORD /f
reg unload HKU\DEFAULTTEMP
@Echo. @Echo. @ECHO xcopy %WinPESource%Scripts\WinToAnd.exe w:\Windows\System32\ /y
xcopy %WinPESource%Scripts\Recovery\OEM\Scripts\WinToAnd.exe w:\Windows\ /y
if %errorlevel% NEQ 0 echo "Failed to copy WinToAnd.exe to w:\Windows\System32"
@Echo. @ECHO xcopy %WinPESource%Scripts\WinToAnd.lnk w:\Windows\System32\ /y
xcopy %WinPESource%Scripts\Recovery\OEM\Scripts\WinToAnd.lnk w:\Windows\ /y
if %errorlevel% NEQ 0 echo "Failed to copy WinToAnd.lnk to w:\Windows\System32"
@Echo.
@Echo. @Echo. @ECHO *****************************************************************
@ECHO Copy over Test tools to \TEST_TOOL
@ECHO \TEST_TOOL SHOULD BE DELETED PRIOR TO SHIPPING
@ECHO *****************************************************************
@ECHO %WinpeSource%Scripts\7za.exe x w:\TEST_TOOL.zip -oW:\
%WinpeSource%Scripts\7za.exe x %WinpeSource%TEST_TOOL.zip -oW:\
if %errorlevel% NEQ 0 echo "Error when run %WinpeSource%Scripts\7za.exe x w:\TEST_TOOL.zip" && goto :error
@Echo. @Echo. @ECHO *****************************************************************
@ECHO Copy over Cleanup.cmd link to desktop
@ECHO *****************************************************************
if EXIST %WinPESource%Scripts\Cleanup.cmd copy %WinPESource%Scripts\Cleanup.cmd w:\Users\Administrator\Desktop /y
@Echo. @Echo. @ECHO *****************************************************************
@ECHO Copy over Customer_Test.cmd link to desktop
@ECHO *****************************************************************
if EXIST %WinPESource%Scripts\Customer_Test.cmd copy %WinPESource%Scripts\Customer_Test.cmd w:\Users\Administrator\Desktop /y
@Echo. @Echo. @ECHO *****************************************************************
@ECHO Copy over SMT_Shutdown.cmd link to desktop
@ECHO *****************************************************************
if EXIST %WinPESource%Scripts\SMT_Shutdown.cmd copy %WinPESource%Scripts\SMT_Shutdown.cmd w:\Users\Administrator\Desktop /y
@Echo. @Echo. @ECHO *****************************************************************
@ECHO Copy over SMT_TEST.cmd link to desktop
@ECHO *****************************************************************
if EXIST %WinPESource%Scripts\SMT_TEST.cmd copy %WinPESource%Scripts\SMT_TEST.cmd w:\Users\Administrator\Desktop /y
@Echo. @Echo. @ECHO *****************************************************************
@ECHO Image deployment COMPLETE. Type EXIT from Command
@ECHO Prompt to restart or turn off device.
@ECHO *****************************************************************
goto :END
:ERROR
@Echo. @ECHO An error has been detected.
@Echo.
goto :END
:ListPar
@Rem This section is to bring a disk number and use it to List Partitions
@Echo.
set TempDisk=%1
diskpart /s x:\Par.txt>x:\ParOutput.txt
for /f "skip=26 tokens=4" %%A in (x:\ParOutput.txt) do (
if /i NOT "%%A"=="Winpe" set Disk=%TempDisk%
)
Goto :EOF
:END
@Rem @Rem Get finish time so we can evaluate total WinPE phase time.
@Rem
call |time>x:\StopTime.txt
@Rem @Rem Now parse both files to display the Start and Finish Time
@Rem @Echo. @Echo.
for /f "tokens=5" %%A in (x:\starttime.txt) do echo Script Start Time is %%A
for /f "tokens=5" %%A in (x:\stoptime.txt) do echo Script Stop Time is %%A
@Echo.
rem pause
exit
"
---------- Post added at 08:52 PM ---------- Previous post was at 08:00 PM ----------
i figured, it s because the storage is full as i installed plain Win 10 before -.-
Cant figure out how to od it with either a usn stick or a keyboard (my hub sucks... )