|
NVI W=%WINDIR%\ ENVI WS=%W%SYSTEM32\ ENVI WW=%W%SYSWOW64\ ENVI MYCOM=\MYCOMMAND.TXT TEAM LOGO %W%RESOURCES\LOGO.JPG|FILE %W%RESOURCES\LOGO.JPG TEXT 正在初始化USBOS X64 Windows 10 PE……#0x000000 L28 T28 $20 FORX /S %WS%DRIVERSTORE\FILEREPOSITORY\basicrender.inf,&f,0,EXEC =!drvload "%&f%" FORX /S %WS%DRIVERSTORE\FILEREPOSITORY\*DISPLAY*.INF,&f,0,EXEC =!drvload "%&f%" EXEC =!drvload "%WS%DRIVERSTORE\FILEREPOSITORY\STORNVME.INF_AMD64_2208ED31D21A132D\STORNVME.INF" EXEC !WINPESHL.EXE INIT IU EXEC =!WPEUTIL UPDATEBOOTINFO CALL $Netapi32.dll,NetJoinDomain,,WORKGROUP,,,,1 FDRV *vol VOLX,,,=X: REGI #HKLM\System\CurrentControlSet\Control\PEFirmwareType,I IFEX $%I%=0x2,ENVI I=UEFI!ENVI I=BIOS FIND $%VOLX%=SKPE,ENVI J=可以!ENVI J=不可 ENVI PEFirmwareType=正在启动USBOS %I% X64 Windows 10 PE(%J%脱盘)! TEXT %PEFirmwareType%\n\n设置 Explorer .......#0x000000 L28 T28 $20 HOTK #112,PECMD.EXE HOTK Shift + #117,PECMD.EXE DISP HOTK Shift + #118,PECMD.EXE DISP W1024 H768 B32 EXEC !%WW%LABEL X: Usbos_System FORX * BMP JPE JPG JPEG PNG GIF PSD ICO TIF TIFF,U,REGI HKCR\Imagine.%U%\shell\print\! FORX * cmdfile txtfile regfile inifile inffile,U,REGI HKCR\%U%\shell\print\! REGI HKCR\Paint.Picture\shell\printto\! REGI $HKCR\Drive\shell\bitlocker\=BitLocker处理工具 REGI $HKCR\Drive\shell\bitlocker\Icon=%SystemRoot%\System32\manage-bde.exe REGI ~HKCR\Drive\shell\bitlocker\command\=%SystemRoot%\System32\bitlocker.cmd %%1 LINK %USERPROFILE%\APPDATA\ROAMING\MICROSOFT\WINDOWS\SENDTO\记事本,%WS%NOTEPAD.EXE ENVI LINKORDV=YES TEXT %PEFirmwareType%\n\n搜索外置 ...... #0x000000 L28 T28 $20 LOAD %WS%MOUNTHI_END.INI "X64\SOFT1.WIM" "X86\VBK.WIM" "X86\NT6APP.WIM" REGI $HKLM\SOFTWARE\USBOS\V2V,VZZV STRL I=%VZZV% FIND #%I%>1, { CALC #P=%I%+1 ENVI TEXTS= ENVI J=1 LOOP #%J%<%P%, { MSTR K=%J%,1,%VZZV% REGI $HKLM\SOFTWARE\USBOS\%K%_INFO,%K%_INFO FIND $%TEXTS%=,ENVI TEXTS=%%K%_INFO%!ENVI TEXTS=%TEXTS%;\n%%K%_INFO% CALC #J=%J%+1 } TEXT %PEFirmwareType%。\n\n发现多个分区存在外置软件包,请按对应键选择(回车、空格或错选5次将直选默认项):\n\n%TEXTS%(默认)。#0x000000 L28 T28 $20 CALC #TI=0 RSTR V2V=1,%VZZV% LOOP #%TI%<5, { WAIT -2000 FIND [KEY=#13 KEY=#32],EXIT LOOP ENVI K=65 FORX * A B C D E F G H I J K L M N O P Q R S T U V W X Y Z,AA, { LPOS J=%AA%,1,%VZZV% FIND [ KEY=#%K% & #%J%>0 ],TEAM ENVI V2V=%AA%|EXIT LOOP CALC #K=%K%+1 } CALC #TI=%TI%+1 } TEAM ENVI TEXTS=|ENVI I=|ENVI J=|ENVI P=|ENVI AA=|ENVI TI=|ENVI V2V=%V2V%:\ }! { FIND #%I%=1,ENVI V2V=%VZZV%:\!ENVI V2V=\ } ENVI VZZV REGI HKLM\SOFTWARE\USBOS\! FORX %V2V%BOOT\USBOS.ico,TV,1,IFEX %V2V%WINDOWS\SYSTEM32\CMD.EXE,!TEAM LSTR VIV=1,%TV%|REGI HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\%VIV%\DefaultIcon\=%TV% ENVI IP=0 FORX /S \PETOOLS\*.WIM,K,0, { LPOS I=:\PETOOLS\DRIVERS,1,%K% FIND #%I%=0,TEAM SIZE I2=%K%|CALC IP=%IP%+%I2% } FIND #%IP%=0,ENVI RUNPH7OK=NOPETOOLS CALL GETWIMTJXISHU CALC #WTI=1 ENVI FINDL=+ LOOP #%WTI%<5, { ENVI I=0 TEXT %PEFirmwareType%\n\n创建用于挂载外置程序的内存盘...... #0x000000 L28 T28 $20 FORX %V2V%BOOT\EXTAPP\X64\SOFT1.WIM,K,0, { FDRV VV=%K% LPOS TI=%VV%,1,%FINDL% FIND #%TI%>0,TEAM ENVI VV=-|EXIT CONTINUE ENVI FINDL=%FINDL%%VV% FIND $%V2V%=\, { IFEX [%VV%BOOT\EXTAPP\X64\SOFT1.WIM & %VV%BOOT\EXTAPP\X86\VBK.WIM & ! %VV%BOOT\EXTAPP\X86\NT6APP.WIM],LSTR V2V=3,%K% } FIND $%V2V%=\,!EXIT FORX } FIND $%VV%=-,TEAM TEXT %PEFirmwareType%\n\n未能找到外置程序...... #0x000000 L28 T28 $20|EXIT LOOP FORX * X64 X86,B, { FORX %VV%\BOOT\EXTAPP\%B%\*.WIM,K,0, { NAME D=%K% FIND [$%B%%D%=X86SOFT1 $%B%%D%=X86NT5APP],!TEAM SIZE I2=%K%|CALC I=%I%+%I2% } } CALC K=%WIMTJXISHU% FIND $%VOLX%=SKPE,CALC K=1+%K% CALC #I=%K%*%I%/1000000 CALC #IM=%WIMTJXISHU%*%IP%/1000000+%I% FIND $%IM%<256,TEAM CALC #IM=%IM%+64|FIND $%IM%<256,CALC #IM=0+256 CALC #IM=%IM%+1024 FIND MEM>%IM%,CALC #I=%IM%-1024! { FIND $%RUNPH7OK%=NOPETOOLS,!ENVI RUNPH7OK=NOPETOOLS CALC #I=%I%+1024 FIND MEM>%I%,CALC #I=%I%-1024! { FIND $%VOLX%=SKPE,CALC #I=(%I%-1024)/(1+%WIMTJXISHU%)*%WIMTJXISHU%+1024 FIND MEM>%I%, { ENVI VOLX=WITHUP LPOS iPos=(可以脱盘),1,%PEFirmwareType% FIND #%iPos%=0,! { LSTR L-Str=%iPos%,%PEFirmwareType% RPOS IPos=),1,%PEFirmwareType% STRL iLen=%PEFirmwareType% CALC #IPos=%iLen%-%IPos%+1 RSTR R-Str=%IPos%,%PEFirmwareType% ENVI PEFirmwareType=%L-Str%只能不可脱盘%R-Str% } CALC #I=%I%-1024 }! { ENVI I=0 } } } FIND #%I%>0, { ENVI RUNPH7OK=YES CALL VHD S %I% FIND $%VOLX%=SKPE, { TEXT %PEFirmwareType%\n\n从%VV%复制外置程序到Y: ...... #0x000000 L28 T28 $20 FORX * X64 X86,B, { PATH Y:\BOOT\EXTAPP\%B% FORX %VV%\BOOT\EXTAPP\%B%\*.WIM,K,0, { NAME D=%K% FIND [$%B%%D%=X86SOFT1 $%B%%D%=X86NT5APP],!FILE %K%=>Y:\BOOT\EXTAPP\%B% } } IFEX Y:\BOOT\EXTAPP\X64\SOFT1.WIM,ENVI VV=Y: } }! { FIND #%WTI%=1,WRIT X:\RUNPH7BAD.YES,+0,MIT } TEXT %PEFirmwareType%\n\n挂载%VV%\BOOT\EXTAPP\*外置程序 ...... #0x000000 L28 T28 $20 FORX * X64 X86,B, { FORX %VV%\BOOT\EXTAPP\%B%\*.WIM,K,0, { NAME I=%K% FIND [$%B%%I%=X86SOFT1 $%B%%I%=X86NT5APP],! { PATH Y:\%B%\%I% MOUN %K%,Y:\%B%\%I%\ IFEX Y:\%B%\%I%\MAIN.INI,LOAD Y:\%B%\%I%\MAIN.INI!LOAD Y:\%B%\%I%\%I%.INI } } } IFEX [Y:\X86\SOFT2\图标文件\SE.ICO & Y:\X64\SOFT1\文件工具\7-ZIP\7ZFM.EXE],EXIT LOOP WAIT 3000 CALC #WTI=%WTI%+1 CALC #X=%WTI%%2 ENVI V2V=!\ FIND #%X%=0,ENVI V2V=\ IFEX Y:,CALL VHD D } TEAM ENVI WTI|ENVI FINDL FORX * Doc Prog,&STL,REGI #HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Start_Track%&STL%s=0 REGI #HKU\.DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShowFrequent=0 REGI #HKU\.DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShowRecent=0 FORX Y:\X86\SOFT2\图标文件\SE.ICO,T,1,LINK %DESKTOP%\手动加载配置,%WS%PECMD.EXE,LOAD OUTPART.INI,%T%,用于配置未能完成加载等异常状态。 LINK %Programs%\管理工具\任务管理器,Taskmgr.exe ENVI P=%WS%USBOSRunStart.ini RUNS PECMD.EXE LOAD %WS%USBOSRunStart.WCS,USBOSRunStart1 WRIT %P%,+0,REGI HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\USBOSRunStart1! WRIT %P%,+0,LOAD Y:\X86\SOFT2\FREEIME\INSTALL.INI WRIT %P%,+0,SITE X:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup,+H+S WRIT %P%,+0,PATH #X:\PROGRAMDATA\MICROSOFT\WINDOWS\START MENU\PROGRAMS WRIT %P%,+0,FILE %Desktop%\desktop.ini WRIT %P%,+0,FORX * Default Public Administrator,&STL,FILE X:\Users\%&STL%\Desktop\desktop.ini WRIT %P%,+0,FORX * PROGRAMDATA Users\Default\APPDATA\ROAMING,&STL,PATH #X:\%&STL%\MICROSOFT\WINDOWS\START MENU\PROGRAMS\Administrative Tools WRIT %P%,+0,TEAM ENVI TUSBOS=NULL|CALL MYC WRIT %P%,+0,FIND $%TUSBOS%=NULL,TEAM SHOW U:0|CALL MYC IFEX Y:\BOOT\EXTAPP\X86\SOFT2.WIM, { WRIT %P%,+0,ENVI PT=允许 WRIT %P%,+0,MESS \n\n\nPE运行期间,允许拔掉启动PE的那个设备!\n\n\n 现在立即自动加载PETOOLS吗?\n\n@PE是以可脱盘模式启动的。 #YN *8000 $Y }! { WRIT %P%,+0,ENVI PT=不可 WRIT %P%,+0,MESS \n\n\nPE运行期间,请保持启动PE的那个设备稳定地连接在本机!\n\n\n 现在立即自动加载PETOOLS吗?\n\n@PE是以不可脱盘模式启动的。 #YN *8000 $Y } FIND $%RUNPH7OK%=YES, { WRIT %P%,+0,FIND $%YESNO%=YES, WRIT %P%,+0,{ WRIT %P%,+0, EXEC -wait -hide SERCHFDR PETOOLS PHD WRIT %P%,+0, FILE X:\PE TOOLS->%Programs%\ WRIT %P%,+0,} WRIT %P%,+0,TIPS 恭 喜!, \n\n%PT%脱离启动盘运行的USBOS Win10 PE全部配置完成。\n\n ,,1,#1 WRIT %P%,+0,WAIT 2000 }! { WRIT %P%,$+0,ENVI RUNPH7OK=%RUNPH7OK% WRIT %P%,+0,FIND [$%RUNPH7OK%=NOPETOOLS & $%YESNO%=YES], WRIT %P%,+0,{ WRIT %P%,+0, EXEC -wait -hide SERCHFDR PETOOLS PHD Y: -WIM WRIT %P%,+0,} WRIT %P%,+0,TIPS 系统内存不是很多!, \n\n就不挂载PETOOLS下的WIM文件了,其余配置已处理完毕。\n\n ,,1,#1 WRIT %P%,+0,WAIT 2000 } WRIT %P%,+0,FILE %CURFILE% WRIT %P%,+0,_SUB MYC WRIT %P%,$+0, ENVI MYCOM=%MYCOM% WRIT %P%,+0, FORX \PETOOLS%MYCOM%,TUSBOS,0,TEAM TIPS 应用外部设定:, \n\n 正在加载“%TUSBOS%”......\n\n ,,1,SHELL32.DLL#71|WAIT 2000|LOAD %TUSBOS% WRIT %P%,+0,_END CMPS %P%,%WS%USBOSRunStart.WCS FILE %P% FIND $%LINKORDV%=YES,LINK %Programs%\硬盘工具\理顺盘符,%WS%PECMD.EXE,TEAM LOAD %WS%SKYPEORDDRV.INI|LOAD %WS%SKYPEORDDRU.INI,Y:\X86\SOFT2\图标文件\SYS.ico ! LOAD %WS%SKYPEORDDRU.INI WRIT X:\VM.bat,+0,REG QUERY "HKLM\SYSTEM\CurrentControlSet\Enum\IDE"|find /i /C "VMware">nul && reg add "HKLM\SYSTEM" /f /v "从VM虚拟机启动" /t REG_SZ /d "YES" WRIT X:\VM.bat,+0,REG QUERY "HKLM\SYSTEM\CurrentControlSet\Enum\SCSI"|find /i /C "VMware">nul && reg add "HKLM\SYSTEM" /f /v "从VM虚拟机启动" /t REG_SZ /d "YES" EXEC =!X:\VM.bat file X:\VM.bat TEXT %PEFirmwareType%\n\n加载外置程序的配置 ...... #0x000000 L28 T28 $20 LOAD OUTPART.INI "%PEFirmwareType%" TEXT FORX /S %WS%DRIVERSTORE\FILEREPOSITORY\WPDMTP*.INF,&F,0,EXEC =!drvload "%&F%" FORX /S %WS%DRIVERSTORE\FILEREPOSITORY\wpdfs.inf,&F,0,EXEC !drvload "%&F%" TIPS -dummy ?R*-20B*-20 EXEC CTFMON.EXE SHEL %W%EXPLORER.EXE EXEC =!SERCHFDR BOOT\WALL_PIC SETWP EXEC !%ProgramFiles%\WinXShell\WinXShell.exe -regist -daemon LOGO FILE X:\PE TOOLS->%PROGRAMS% TEAM ENVI IP|ENVI I|ENVI K|ENVI T2|ENVI VV|ENVI B|ENVI VOLX|ENVI O7|ENVI RUNPH7OK|ENVI GPPHD|ENVI AA|ENVI P|ENVI MYCOM _SUB VHD ENVI &P=X:\DISKPH7.TXT FILE %&P% FIND $%~1=S,WRIT %&P%,$1,CREATE VDISK FILE="%W%Y.VHD" MAXIMUM=%~2 TYPE=EXPANDABLE WRIT %&P%,$+0,SELECT VDISK FILE="%W%Y.VHD" FIND $%~1=S, { WRIT %&P%,+0,ATTACH VDISK WRIT %&P%,+0,CREATE PARTITION PRIMARY WRIT %&P%,+0,ASSIGN LETTER=Y WRIT %&P%,+0,FORMAT FS=NTFS LABEL=Usbos_Software QUICK } FIND $%~1=D,WRIT %&P%,+0,Detach VDISK WRIT %&P%,+0,EXIT EXEC =!DISKPART /S %&P% FIND $%~1=D,FILE %W%Y.VHD FILE %&P% _END _SUB SKYPEORDDRV TEXT %PEFirmwareType%\n\n请选择是否立即整理盘符:\n\nEsc :跳过此步骤(可防止因磁盘分区表有问题而卡死于此步骤);\nEsc 之外的其它任意键:立即执行(默认选项;最好不敲回车键 )。#0x000000 L28 T28 $20 WAIT -10000 IFEX KEY=#27, { TEXT %PEFirmwareType%\n\n本次启动过程不自动整理盘符。#0x000000 L28 T28 $20 ENVI LINKORDV=YES }! { TEXT %PEFirmwareType%\n\n理顺盘符 .......#0x000000 L28 T28 $20 LOAD %WS%SKYPEORDDRV.INI TEXT %PEFirmwareType%\n\n理顺盘符操作完毕!#0x000000 L28 T28 $20 WAIT 400 } _END _SUB GETWIMTJXISHU CALC #WIMTJXISHU=260 FORX \PETOOLS%MYCOM%,T,0, { FILE %T%=>X:\ CACL #IL=1 CALC #NL=0 CALC #ASTR=0 LOOP #%IL%<100000, { READ X:%MYCOM%,%IL%,CL FIND [$"%CL%"=" " $%CL%=], { CALC #NL=%NL%+1 FIND #%NL%>19,EXIT LOOP }! { CALC #NL=0 LPOS IPOS=WIM体积系数,1,%CL% FIND #%IPOS%>0, { LPOS JPOS=//,1,%CL% FIND [#%JPOS%=0 #%JPOS%>%IPOS%], { TEXT %PEFirmwareType%\n\n正从%T%查询WIM体积系数...... #0x000000 L28 T28 $20 LPOS IPOS==,1,%CL% STRL JL=%CL% CALC #IPOS=%JL%-%IPOS% RSTR ASTR=%IPOS%,%CL% STRL J2=%ASTR% LPOS NPOS=//,1,%ASTR% FIND #%NPOS%>0,TEAM CALC #IPS=%J2%-%NPOS%|LSTR ASTR=%IPS%,%ASTR% STRL #J2=%ASTR% LSTR TSTR=1,%ASTR% LOOP %TSTR%= ,TEAM CALC #J2=%J2%-1|RSTR ASTR=%J2%,%ASTR%|LSTR TSTR=1,%ASTR% STRL J2=%ASTR% LPOS NPOS= ,1,%ASTR% FIND #%NPOS%>0,TEAM CALC #IPS=%J2%-%NPOS%|LSTR ASTR=%IPS%,%ASTR% STRL J2=%ASTR% RSTR TSTR=1,%ASTR% LOOP %TSTR%= ,TEAM CALC #J2=%J2%-1|LSTR ASTR=%J2%,%ASTR%|RSTR TSTR=1,%ASTR% CALC ASTR=%ASTR%*100 EXIT LOOP } } } CALC #IL=%IL%+1 } FIND #%ASTR%>%WIMTJXISHU%,CALC WIMTJXISHU=%ASTR% FILE X:%MYCOM% FIND #%WIMTJXISHU%>600,TEAM CALC #WIMTJXISHU=600|EXIT FORX } FIND #%WIMTJXISHU%<260,CALC #WIMTJXISHU=260 CALC WIMTJXISHU=%WIMTJXISHU%/100 _END FILE %CURFILE% |
|