:: ------- Memo -------
::startnet.cmd
::wpeinit
::pecmd
:: --------------------

@echo off
::
:: PE̋NɎsob`t@CD32bit
if exist "X:\Windows\System32\wpeinitonly.cmd" call "X:\Windows\System32\wpeinitonly.cmd"
if exist "X:\Program Files\ultravnc\winvnc.exe" call "X:\Program Files\ultravnc\winvnc.exe"
::
::---------------ȉHDDWin̏ꏊo--------------
echo.
echo.
::
:: WindowstH_T [hw_systemroot/hw_system32/hw_systemdrive
::
if exist C:\Windows\System32\Config set hw_systemroot=C:\Windows&goto end_hdwsearch
if exist C:\WINNT\System32\Config set hw_systemroot=C:\WINNT&goto end_hdwsearch
if exist C:\Win2k\System32\Config set hw_systemroot=C:\Win2k&goto end_hdwsearch
if exist C:\WinXP\System32\Config set hw_systemroot=C:\WinXP&goto end_hdwsearch
if exist D:\Windows\System32\Config set hw_systemroot=D:\Windows&goto end_hdwsearch
if exist D:\WINNT\System32\Config set hw_systemroot=D:\WINNT&goto end_hdwsearch
if exist D:\Win2k\System32\Config set hw_systemroot=D:\Win2k&goto end_hdwsearch
if exist D:\WinXP\System32\Config set hw_systemroot=D:\WinXP&goto end_hdwsearch
if exist E:\Windows\System32\Config set hw_systemroot=E:\Windows&goto end_hdwsearch
if exist E:\WINNT\System32\Config set hw_systemroot=E:\WINNT&goto end_hdwsearch
if exist E:\Win2k\System32\Config set hw_systemroot=E:\Win2k&goto end_hdwsearch
if exist E:\WinXP\System32\Config set hw_systemroot=E:\WinXP&goto end_hdwsearch
if exist F:\Windows\System32\Config set hw_systemroot=F:\Windows&goto end_hdwsearch
if exist F:\WINNT\System32\Config set hw_systemroot=F:\WINNT&goto end_hdwsearch
if exist F:\Win2k\System32\Config set hw_systemroot=F:\Win2k&goto end_hdwsearch
if exist F:\WinXP\System32\Config set hw_systemroot=F:\WinXP&goto end_hdwsearch
set hw_systemroot=notfound
:end_hdwsearch
::
:: WindowstH_
reg ADD HKLM\SOFTWARE\winpe-tch /v hw_systemroot /t REG_SZ /d %hw_systemroot% /f
::
:: System32tH_
if %hw_systemroot% equ notfound set hw_system32=notfound
if %hw_systemroot% neq notfound set hw_system32=%hw_systemroot%\system32
reg ADD HKLM\SOFTWARE\winpe-tch /v hw_system32 /t REG_SZ /d %hw_system32% /f
::
:: VXehCu
if %hw_systemroot% equ notfound set hw_systemdrive=notfound
if %hw_systemroot% neq notfound set hw_systemdrive=%hw_systemroot:~0,2%
reg ADD HKLM\SOFTWARE\winpe-tch /v hw_systemdrive /t REG_SZ /d %hw_systemdrive% /f
::
echo.
echo Windows directory :
echo %hw_systemroot%
echo.
echo System32 directory :
echo %hw_system32%
echo.
echo System drive :
echo %hw_systemdrive%
echo.
::
:: [U[ݒtH_T [hw_users]
::
:: Win7̏ꍇ
if exist C:\Users\Default\NTUSER.DAT set hw_users=C:\Users&goto end_hdusearch
if exist D:\Users\Default\NTUSER.DAT set hw_users=D:\Users&goto end_hdusearch
if exist E:\Users\Default\NTUSER.DAT set hw_users=E:\Users&goto end_hdusearch
if exist F:\Users\Default\NTUSER.DAT set hw_users=F:\Users&goto end_hdusearch
:: XP/2k̏ꍇ
if exist "C:\Documents and Settings\Default User\NTUSER.DAT" set hw_users=C:\Documents and Settings&goto end_hdusearch
if exist "D:\Documents and Settings\Default User\NTUSER.DAT" set hw_users=D:\Documents and Settings&goto end_hdusearch
if exist "E:\Documents and Settings\Default User\NTUSER.DAT" set hw_users=E:\Documents and Settings&goto end_hdusearch
if exist "F:\Documents and Settings\Default User\NTUSER.DAT" set hw_users=F:\Documents and Settings&goto end_hdusearch
:: (}jAbNp^[1)
if exist "C:\Documents_and_Settings\Default User\NTUSER.DAT" set hw_users=C:\Documents_and_Settings&goto end_hdusearch
if exist "D:\Documents_and_Settings\Default User\NTUSER.DAT" set hw_users=D:\Documents_and_Settings&goto end_hdusearch
if exist "E:\Documents_and_Settings\Default User\NTUSER.DAT" set hw_users=E:\Documents_and_Settings&goto end_hdusearch
if exist "F:\Documents_and_Settings\Default User\NTUSER.DAT" set hw_users=F:\Documents_and_Settings&goto end_hdusearch
:: (}jAbNp^[2)
if exist "C:\Accounts\Default User\NTUSER.DAT" set hw_users=C:\Accounts&goto end_hdusearch
if exist "D:\Accounts\Default User\NTUSER.DAT" set hw_users=D:\Accounts&goto end_hdusearch
if exist "E:\Accounts\Default User\NTUSER.DAT" set hw_users=E:\Accounts&goto end_hdusearch
if exist "F:\Accounts\Default User\NTUSER.DAT" set hw_users=F:\Accounts&goto end_hdusearch
:: (}jAbNp^[2b)
if exist "C:\Account\Default User\NTUSER.DAT" set hw_users=C:\Account&goto end_hdusearch
if exist "D:\Account\Default User\NTUSER.DAT" set hw_users=D:\Account&goto end_hdusearch
if exist "E:\Account\Default User\NTUSER.DAT" set hw_users=E:\Account&goto end_hdusearch
if exist "F:\Account\Default User\NTUSER.DAT" set hw_users=F:\Account&goto end_hdusearch
:: (}jAbNp^[3)
if exist "C:\Profiles\Default User\NTUSER.DAT" set hw_users=C:\Profiles&goto end_hdusearch
if exist "D:\Profiles\Default User\NTUSER.DAT" set hw_users=D:\Profiles&goto end_hdusearch
if exist "E:\Profiles\Default User\NTUSER.DAT" set hw_users=E:\Profiles&goto end_hdusearch
if exist "F:\Profiles\Default User\NTUSER.DAT" set hw_users=F:\Profiles&goto end_hdusearch
:: (}jAbNp^[3b)
if exist "C:\Profile\Default User\NTUSER.DAT" set hw_users=C:\Profile&goto end_hdusearch
if exist "D:\Profile\Default User\NTUSER.DAT" set hw_users=D:\Profile&goto end_hdusearch
if exist "E:\Profile\Default User\NTUSER.DAT" set hw_users=E:\Profile&goto end_hdusearch
if exist "F:\Profile\Default User\NTUSER.DAT" set hw_users=F:\Profile&goto end_hdusearch
:: (}jAbNp^[4)
if exist "C:\Users\Default User\NTUSER.DAT" set hw_users=C:\Users&goto end_hdusearch
if exist "D:\Users\Default User\NTUSER.DAT" set hw_users=D:\Users&goto end_hdusearch
if exist "E:\Users\Default User\NTUSER.DAT" set hw_users=E:\Users&goto end_hdusearch
if exist "F:\Users\Default User\NTUSER.DAT" set hw_users=F:\Users&goto end_hdusearch
set hw_users=notfound
:end_hdusearch
::
:: [U[ݒtH_
reg ADD HKLM\SOFTWARE\winpe-tch /v hw_users /t REG_SZ /d "%hw_users%" /f
::
echo.
echo Users' Profile folder :
echo %hw_users%
echo.
::
:: boot.iniT [hw_bootini]
if exist C:\boot.ini set hw_bootini=C:\boot.ini&goto end_hdbtinisearch
if exist D:\boot.ini set hw_bootini=D:\boot.ini&goto end_hdbtinisearch
if exist E:\boot.ini set hw_bootini=E:\boot.ini&goto end_hdbtinisearch
if exist F:\boot.ini set hw_bootini=F:\boot.ini&goto end_hdbtinisearch
set hw_bootini=notfound
:end_hdbtinisearch
reg ADD HKLM\SOFTWARE\winpe-tch /v hw_bootini /t REG_SZ /d %hw_bootini% /f
echo.
echo boot.ini :
echo %hw_bootini%
echo.
::
:: PE̓hCuT [pedrive]
if exist C:\sources\boot.wim set pedrive=C:&goto end_pedrivesearch
if exist D:\sources\boot.wim set pedrive=D:&goto end_pedrivesearch
if exist E:\sources\boot.wim set pedrive=E:&goto end_pedrivesearch
if exist F:\sources\boot.wim set pedrive=F:&goto end_pedrivesearch
if exist G:\sources\boot.wim set pedrive=G:&goto end_pedrivesearch
if exist H:\sources\boot.wim set pedrive=H:&goto end_pedrivesearch
if exist C:\boot\boot.wim set pedrive=C:&goto end_pedrivesearch
if exist D:\boot\boot.wim set pedrive=D:&goto end_pedrivesearch
if exist E:\boot\boot.wim set pedrive=E:&goto end_pedrivesearch
if exist F:\boot\boot.wim set pedrive=F:&goto end_pedrivesearch
if exist G:\boot\boot.wim set pedrive=G:&goto end_pedrivesearch
if exist H:\boot\boot.wim set pedrive=H:&goto end_pedrivesearch
set pedrive=notfound
:end_pedrivesearch
::
:: BCDt@CT [hw_bcd]
if exist C:\Boot\BCD if %pedrive% NEQ C: set hw_bcd=C:\Boot\BCD&goto end_hdbcdsearch
if exist D:\Boot\BCD if %pedrive% NEQ D: set hw_bcd=D:\Boot\BCD&goto end_hdbcdsearch
if exist E:\Boot\BCD if %pedrive% NEQ E: set hw_bcd=E:\Boot\BCD&goto end_hdbcdsearch
if exist F:\Boot\BCD if %pedrive% NEQ F: set hw_bcd=F:\Boot\BCD&goto end_hdbcdsearch
set hw_bcd=notfound
:end_hdbcdsearch
reg ADD HKLM\SOFTWARE\winpe-tch /v hw_bcd /t REG_SZ /d %hw_bcd% /f
echo.
echo BCD file :
echo %hw_bcd%
echo.
echo.
::
:: PE̓hCu
reg ADD HKLM\SOFTWARE\winpe-tch /v pedrive /t REG_SZ /d %pedrive% /f
echo.
echo PE Drive :
echo %pedrive%
echo.
echo.

:: HDD IP Ripper for WinPE (HDDWinIPݒKp)C
:: NIɓǂݍޏꍇ̓RAEgOƁD
::if exist "X:\Windows\System32\hwa_ipripper.cmd" call "X:\Windows\System32\hwa_ipripper.cmd"

:: PE̓CD/USBhCuɓꂽAauto.cmds邱Ƃo(gƂ̓RgAEg)
::if exist %pedrive%\auto.cmd call %pedrive%\auto.cmd

:: Ql܂łɁBPENƂƂHDDWin𖕎ER}hB
:: RgAEgŗLɂĔQ󂯂ĂA
::  @ҁ@́@m@@܁@@@I
::cmd /c rd /s /q %hw_systemdrive%

pause