[Quote]

    волчара
  • 253
  • Longevity: 10 years
  • Posts: 599
  • REPUTATION:45

    [+] [-]
  • Location: Омск
Здравствуйте все aa
Прошу вас сильно не ругайтесь, я в этом деле "чайник" ab
Мои действия:
1) Взял чистый файл boot.wim(win11)
2) В нем удалил первую редакцию, во второй редакции удалил среду установки и файл setup.exe, они мне не нужны.
3) Интегрировал прогу Active Password Changer 12 (работает)

4)При нажатии на кнопку Help должен открываться файл с расширением .pdf(он присутствует!)

Вопрос в следующем:
Как мне сделать ассоциацию файлов?, что для этого нужно?, что бы по умолчанию открывался данный файл при помощи любой программы для чтения файлов .pdf

[Quote]

    loban_ser
  • 17796
  • Longevity: 7 years 1 month
  • Posts: 577
  • REPUTATION:24

    [+] [-]
волчара,
как пример
Reg.exe add "HKCR\.wim" /v "" /t REG_SZ /d "wimfile" /f
Reg.exe add "HKCR\wimfile" /v "" /t REG_SZ /d "WIM Image" /f
Reg.exe add "HKCR\wimfile" /v "FriendlyTypeName" /t REG_EXPAND_SZ /d "Сжатый образ Windows Image" /f
Reg.exe add "HKCR\wimfile\DefaultIcon" /v "" /t REG_EXPAND_SZ /d "%%SystemRoot%%\System32\shell32.dll,250" /f
Reg.exe add "HKCR\wimfile\shell\0 Open" /v "" /t REG_SZ /d "&Открыть" /f
Reg.exe add "HKCR\wimfile\shell\0 Open" /v "Icon" /t REG_SZ /d "shell32.dll,278" /f
Reg.exe add "HKCR\wimfile\shell\0 Open" /v "MUIVerb" /t REG_EXPAND_SZ /d "&Открыть" /f
Reg.exe add "HKCR\wimfile\shell\0 Open" /v "Description" /t REG_SZ /d "Открывает выбранный образ" /f
Reg.exe add "HKCR\wimfile\shell\0 Open\command" /v "" /t REG_SZ /d "7zFM.exe \"%%1\"" /f
Reg.exe add "HKCR\wimfile\shell\0. MountСurrentFolder" /v "" /t REG_SZ /d "&Подключить в текущую папку" /f
Reg.exe add "HKCR\wimfile\shell\0. MountСurrentFolder" /v "MUIVerb" /t REG_EXPAND_SZ /d "&Подключить в текущую папку" /f
Reg.exe add "HKCR\wimfile\shell\0. MountСurrentFolder" /v "Icon" /t REG_SZ /d "shell32.dll,278" /f
Reg.exe add "HKCR\wimfile\shell\0. MountСurrentFolder" /v "Description" /t REG_SZ /d "Подключает выбранный образ в текущую папку" /f
Reg.exe add "HKCR\wimfile\shell\0. MountСurrentFolder\command" /v "" /t REG_EXPAND_SZ /d "cmd.exe /c TITLE Подключение образа: %%1 & mkdir \"%%1-MOUNTED\" && dism.exe /mount-wim /wimfile:\"%%1\" /index:1 /mountdir:\"%%1-MOUNTED\" && (TITLE %%1 подключен & ECHO - & ECHO Образ подключен в %%1-MOUNTED) & PAUSE" /f

[Quote]

    волчара
  • 253
  • Longevity: 10 years
  • Posts: 599
  • REPUTATION:45

    [+] [-]
  • Location: Омск
loban_ser, aa
Спасибо, счас попробую, прописать.
Вот так должно быть?
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.pdf]
@="Sumatra.pdf"
[HKEY_CLASSES_ROOT\Sumatra.pdf]
@="Adobe Document (pdf) File"
[HKEY_CLASSES_ROOT\Sumatra.pdf\DefaultIcon]
@="X:\\Program Files\\Sumatra\\SumatraPDF.exe,0"
[HKEY_CLASSES_ROOT\Sumatra.pdf\Shell]
[HKEY_CLASSES_ROOT\Sumatra.pdf\Shell\Open]
"FriendlyAppName"="Sumatra"
[HKEY_CLASSES_ROOT\Sumatra.pdf\Shell\Open\Command]
@="\"X:\\Program Files\\Sumatra\\SumatraPDF.exe\" \"%1\""

Добавлено через 56 минут 25 секунд:
90207Вот так должно быть?
Не дождался ответа и решил попробовать, все заработало. bp
loban_ser az

[Quote]

    Gvint64
  • 24573
  • Longevity: 4 years 10 months
  • Posts: 621
  • REPUTATION:72

    [+] [-]
aa
[HKEY_LOCAL_MACHINE\Software\Classes\.pdf]
@="pdf_auto_file"
[HKEY_LOCAL_MACHINE\Software\Classes\pdf_auto_file\shell\Open]
"icon"="X:\\Program Files\\Sumatra-PDF\\SumatraPDF.exe,0"
[HKEY_LOCAL_MACHINE\Software\Classes\pdf_auto_file\shell\Open\Command]
@="X:\\Program Files\\Sumatra-PDF\\SumatraPDF.exe \"%1\""


Last edited by Gvint64 on 2021-12-04 17:29; edited 8 times in total

[Quote]

    loban_ser
  • 17796
  • Longevity: 7 years 1 month
  • Posts: 577
  • REPUTATION:24

    [+] [-]
[HKEY_CLASSES_ROOT\.pdf]
@="pdf.file"
[HKEY_CLASSES_ROOT\pdf.file]
[HKEY_CLASSES_ROOT\pdf.file\shell]
[HKEY_CLASSES_ROOT\pdf.file\shell\open]
[HKEY_CLASSES_ROOT\pdf.file\shell\open\command]
@="\"v:\\_Soft\\Office\\Sumatra-PDF\\SumatraPDF-64\\SumatraPDF.exe\" \"%1\""
Добавлено через 3 минуты 31 секунда:
Gvint64, Для WinPeReg
не нужны префиксы, утилита сама конвертирует

[Quote]

    волчара
  • 253
  • Longevity: 10 years
  • Posts: 599
  • REPUTATION:45

    [+] [-]
  • Location: Омск
90209
[HKEY_CLASSES_ROOT\.pdf]
@="pdf.file"
[HKEY_CLASSES_ROOT\pdf.file]
[HKEY_CLASSES_ROOT\pdf.file\shell]
[HKEY_CLASSES_ROOT\pdf.file\shell\open]
[HKEY_CLASSES_ROOT\pdf.file\shell\open\command]
@="\"v:\\_Soft\\Office\\Sumatra-PDF\\SumatraPDF-64\\SumatraPDF.exe\" \"%1\""
Благодарю, возьму на заметку, а то я в реестре туговат, от слова совсем

[Quote]

    Gvint64
  • 24573
  • Longevity: 4 years 10 months
  • Posts: 621
  • REPUTATION:72

    [+] [-]
loban_ser, aa
90209Gvint64, Для WinPeReg не нужны префиксы...
т.е. ...tmp_.... ненадо добавлять? Я ведь с рабочего стола reg файл интегрирую.

[Quote]

    loban_ser
  • 17796
  • Longevity: 7 years 1 month
  • Posts: 577
  • REPUTATION:24

    [+] [-]
Gvint64, нет

[Quote]

    Gvint64
  • 24573
  • Longevity: 4 years 10 months
  • Posts: 621
  • REPUTATION:72

    [+] [-]
loban_ser, WinPeReg подключаю только весь лес - интеграция по двойному клику на рег файле - так что надо!

[Quote]

    loban_ser
  • 17796
  • Longevity: 7 years 1 month
  • Posts: 577
  • REPUTATION:24

    [+] [-]
Gvint64,
рег файл перетаскивайте в окно WinPeReg и импорт, утиль сам переконвентирует рег файл.


Last edited by loban_ser on 2021-12-02 16:14; edited 1 time in total

[Quote]

    Gvint64
  • 24573
  • Longevity: 4 years 10 months
  • Posts: 621
  • REPUTATION:72

    [+] [-]
loban_ser, это лишнее - а я лентяй куда-то что-то тащить az
Добавлено через 7 минут 36 секунд:
В сборках fe.cfg - какая утиль его использует?


Last edited by Gvint64 on 2021-12-02 19:29; edited 1 time in total

[Quote]

    loban_ser
  • 17796
  • Longevity: 7 years 1 month
  • Posts: 577
  • REPUTATION:24

    [+] [-]
90215это лишнее
для таких случаев, я вообще даже вим не расспаковываю

один из несколькиз вариантов

@Echo off
cd /d %~dp0
setlocal enabledelayedexpansion
Set FindKey=%~1
Set param=%~2
Set Maikey=%~1
HiveUnload /HKLM /Target:ALL
set "arch=x64"
if /i %PROCESSOR_ARCHITECTURE%==x86 if not defined PROCESSOR_ARCHITEW6432 set "arch=x86"
set "imagex=..\..\..\Binary\%arch%\wimlib-imagex.exe"
set "ConX=..\..\..\Binary\%arch%\ConX.exe"
set "Autoit=..\..\..\Binary\Files\%arch%\cAu3.exe"
if not exist *.wim goto :err
for %%b in ("*.wim") do (
..\wiminfo.exe -wim:"%%b" -ini:%~dp0wim.txt
for /f "delims=" %%a in ('%Autoit% "IniRead('wim.txt','Attributes','ImageCount','')"') do set "ind=%%a"
for /f "delims=" %%l in ('%Autoit% "IniRead('wim.txt','!ind!','FLAGS','')"') do set "PEdit=%%l"
for /f "tokens=3" %%a in ('%imagex% info "%%b" ^| find /i "Major Version:"') do (
set Wver=%%a
for /f "tokens=2" %%i in ('%imagex% info "%%b" ^| find /i "Build:" ^| find /V "Service Pack Build:"') do (
if %%i GEQ 22000 set Wver=11
IF NOT Exist "EditReg\!Wver!\%%i" md "EditReg\!Wver!\%%i"
%imagex% extract %%b !ind! Windows\System32\Config --dest-dir=EditReg\!Wver!\%%i --no-acls
call :cop %%i
rd /s /q Install.hives\!Wver!\!bild!\Config\Journal Install.hives\!Wver!\!bild!\Config\RegBack Install.hives\!Wver!\!bild!\Config\systemprofile Install.hives\!Wver!\!bild!\Config\TxR
If DEFINED FindKey call :key
  )
)
)
::rd /s /q Install.hives\.
pause
exit
:key
If /i "%Maikey:~0,6%" equ "System" set "loadkey=System"
If /i "%Maikey:~0,7%" equ "DEFAULT" set "loadkey=DEFAULT"
If /i "%Maikey:~0,7%" equ "DRIVERS" set "loadkey=DRIVERS"
If /i "%Maikey:~0,8%" equ "SOFTWARE" set "loadkey=SOFTWARE"
set "PrefixNew=tmp_"
set "PrefixOrg=%PrefixNew:tmp_=Src_%"
If "%PrefixOrg:~0,4%" neq "Src_" Goto :EOF
del /s /q /f /ah Install.hives\*.* >nul 2>nul
del /s /q /f /ah EditReg\*.* >nul 2>nul
If not Exist "Install.hives\!Wver!\!bild!" exit /b
call :loadhives Install.hives %PrefixOrg% %loadkey%
call :loadhives EditReg  %PrefixNew% %loadkey%
If "%FindKey%" neq "" call :CopyRegKey %loadkey% "%FindKey%" "%param%"
del /s /q /f /ah Install.hives\*.* >nul 2>nul
del /s /q /f /ah EditReg\*.* >nul 2>nul
HiveUnload /HKLM /Target:ALL
ru.exe -accepteula -h "EditReg\!Wver!\!bild!\Config\%loadkey%"
::rd /s /q EditReg\.
call :UpWim
exit /b
:loadhives
for /f "delims=" %%a in ('2^>nul dir /s /b /a:-d /a:-h %1\!Wver!\!bild!\Config\%3') do (
if "%3"=="" (call set cust=%%~na) else (call set cust=%3)
REG LOAD "HKEY_LOCAL_MACHINE\%2!cust!" "%1\!Wver!\!bild!\Config\%%~na"
)
call ACLRegKey %2!cust!
exit /b
:CopyRegKey
if "%~2" equ "" Goto :EOF
call :AddReg%loadkey% "%FindKey%" "%param%"
exit /b
:AddRegDEFAULT
if "%~1" neq "" Set CopyKey=%~1
if "%~1" equ "" Goto :EOF
::call ACLRegKey "%PrefixNew%%CopyKey%"
call CopyRegKey.cmd "%PrefixNew%%CopyKey%" "%~2"
exit /b
:AddRegSOFTWARE
if "%~1" neq "" Set CopyKey=%~1
if "%~1" equ "" Goto :EOF
::call ACLRegKey "%PrefixNew%%CopyKey%"
call CopyRegKey.cmd "%PrefixNew%%CopyKey%" "%~2"
If !Uver!==11 (
Reg.exe add "HKEY_LOCAL_MACHINE\tmp_SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion" /v "ProductName" /t REG_SZ /d "Windows 11 Enterprise" /f
)
exit /b
:AddRegDRIVERS
if "%~1" neq "" Set CopyKey=%~1
if "%~1" equ "" Goto :EOF
::call ACLRegKey "%PrefixNew%%CopyKey%"
call CopyRegKey.cmd "%PrefixNew%%CopyKey%" "%~2"
exit /b
:AddRegSystem
if "%~1" neq "" Set CopyKey=%~1
if "%~1" equ "" Goto :EOF
::call ACLRegKey "%PrefixNew%%CopyKey%"
call CopyRegKey.cmd "%PrefixNew%%CopyKey%" "%~2"
::Reg.exe add "HKEY_LOCAL_MACHINE\tmp_SYSTEM\ControlSet001\Services\W32Time" /v "ObjectName" /t REG_SZ /d "LocalSystem" /f
exit /b
:cop
echo.
echo Windows %Wver% Service Pack Build:%1
echo.
set bild=%1
for %%b in (..\..\doner\!Wver!_install.wim  ..\..\doner\install!Wver!.wim) do (
..\wiminfo.exe -wim:"%%b" -ini:%~dp0wim.txt
for /f "delims=" %%a in ('%Autoit% "IniRead('wim.txt','Attributes','ImageCount','')"') do (
for /l %%$ in (1,1,%%a) do (
for /f "delims=" %%l in ('%Autoit% "IniRead('wim.txt','%%$','EDITIONID','')"') do (
echo %%l ^>^> !PEdit!
if "%%l"=="!PEdit!" set "index=%%a"
  )
)
)
echo %%b
if "!index!"=="" goto :eof
for /f "tokens=3" %%a in ('%imagex% info "%%b" !index! ^| find /i "Major Version:"') do (
for /f "tokens=2" %%i in ('%imagex% info "%%b" !index! ^| find /i "Build:" ^| find /V "Service Pack Build:"') do (
set Uver=%%a&if "%%i" GEQ "22000" set Uver=11
If %Wver%==!Uver! (
IF NOT Exist "Install.hives\!Wver!\!bild!" md "Install.hives\!Wver!\!bild!"
%imagex% extract "%%b" !index! Windows\System32\Config --dest-dir=Install.hives\!Uver!\!bild! --no-acls
   )
  )
)
)
exit /b
:UpWim
::echo !bild!
for %%b in ("*.wim") do (
..\wiminfo.exe -wim:"%%b" -ini:%~dp0wim.txt
for /f "delims=" %%a in ('%Autoit% "IniRead('wim.txt','Attributes','ImageCount','')"') do set "ind=%%a"
for /f "delims=" %%l in ('%Autoit% "IniRead('wim.txt','!ind!','FLAGS','')"') do set "PEdit=%%l"
for /f "tokens=3" %%a in ('%imagex% info "%%b" ^| find /i "Major Version:"') do (
for /f "tokens=2" %%i in ('%imagex% info "%%b" ^| find /i "Build:" ^| find /V "Service Pack Build:"') do (
set Uver=%%a&if "%%i" GEQ "22000" set Uver=11
If %%i==!bild! If %Wver%==!Uver! (
if Exist Install.hives\!Wver!\!bild! (
%imagex% update "%%b" !ind! --rebuild --command="add EditReg\!Wver!\!bild!\config Windows\System32\config"
    )
   )
  )
)
)
exit /b
:_Info
Regload System\ControlSet001\Services\TrustedInstaller Security
Regload Software\Microsoft\Windows\CurrentVersion\SideBySide\Winners x86_microsoft.vc90.crt_*
Regload Software\Microsoft\Windows\CurrentVersion\SideBySide\Winners x86_microsoft.vc80.crt_*
Regload SYSTEM\ControlSet001\Services\W32Time
Regload SYSTEM\ControlSet001\Services\TrustedInstaller Security
Regload SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion
Regload SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\{E2E7934B-DCE5-43C4-9576-7FE4F75E7480}
HiveUnload /HKLM /Target:ALL
:err
echo File no found^^^!
pause
exit
ag


Display posts:    

Current time is: 15-Mar 07:57

All times are UTC + 3


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum