Вы должны войти, чтобы создавать сообщения и темы.

.cmd-файл для установки приложений .appx и .AppxBundle, и в том числе из контекстного меню [Решено]

Приветствую Друзья!
Тут у одного человека с форума увидел вот такую удобную штуку, .cmd-файл для установки приложений .appx и .AppxBundle. Что там за команда внутри у этого файла? И ещё подскажите пожалуйста как установить те же приложения .appx и .AppxBundle, только из контекстного меню(нажимая по этим файлам правой кнопкой), используя этот же .cmd-файл (ссылаясь на него)

Лайкнул Сибирь
Сибирь

Psydiant, Приветствую, не знаю что там у него за CMD, вот Вам мой вариант. Применять в CMD, не из BAT

reg add "HKCR\SystemFileAssociations\.Appx\shell\Install" /v "MUIVerb" /t REG_SZ /d "Установить" /f >nul
reg add "HKCR\SystemFileAssociations\.Appx\shell\Install" /v "Icon" /t REG_SZ /d "C:\Windows\System32\shell32.dll,296" /f >nul
reg add "HKCR\SystemFileAssociations\.Appx\shell\Install\command" /v "" /t REG_SZ /d "PowerShell -ExecutionPolicy Bypass \"Add-AppxPackage '%1'\"" /f >nul

reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /v "MUIVerb" /t REG_SZ /d "Установить" /f >nul
reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /v "Icon" /t REG_SZ /d "C:\Windows\System32\shell32.dll,296" /f >nul
reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install\command" /v "" /t REG_SZ /d "PowerShell -ExecutionPolicy Bypass \"Add-AppxPackage '%1'\"" /f >nul
rem -----------------------------------------------------------------------------------------------------------------------------------------------------
rem Удалить пункты
reg delete "HKCR\SystemFileAssociations\.Appx\shell\Install" /f >nul 2>&1
reg delete "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /f >nul 2>&1

 

Лайкнули 𝐓𝐇𝐎𝐑𝐭𝐢𝐤, Lanc и ещё 3
𝐓𝐇𝐎𝐑𝐭𝐢𝐤LancСибирьvbPsydiant
Цитата: Vlado от 22.01.2023, 22:53

Psydiant, Приветствую, не знаю что там у него за CMD, вот Вам мой вариант. Применять в CMD, не из BAT

 
 
 
 
reg add "HKCR\SystemFileAssociations\.Appx\shell\Install" /v "MUIVerb" /t REG_SZ /d "Установить" /f >nul
reg add "HKCR\SystemFileAssociations\.Appx\shell\Install" /v "Icon" /t REG_SZ /d "C:\Windows\System32\shell32.dll,296" /f >nul
reg add "HKCR\SystemFileAssociations\.Appx\shell\Install\command" /v "" /t REG_SZ /d "PowerShell -ExecutionPolicy Bypass \"Add-AppxPackage '%1'\"" /f >nul
 
reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /v "MUIVerb" /t REG_SZ /d "Установить" /f >nul
reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /v "Icon" /t REG_SZ /d "C:\Windows\System32\shell32.dll,296" /f >nul
reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install\command" /v "" /t REG_SZ /d "PowerShell -ExecutionPolicy Bypass \"Add-AppxPackage '%1'\"" /f >nul
rem -----------------------------------------------------------------------------------------------------------------------------------------------------
rem Удалить пункты
reg delete "HKCR\SystemFileAssociations\.Appx\shell\Install" /f >nul>2&1
reg delete "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /f >nul>2&1
reg add "HKCR\SystemFileAssociations\.Appx\shell\Install" /v "MUIVerb" /t REG_SZ /d "Установить" /f >nul reg add "HKCR\SystemFileAssociations\.Appx\shell\Install" /v "Icon" /t REG_SZ /d "C:\Windows\System32\shell32.dll,296" /f >nul reg add "HKCR\SystemFileAssociations\.Appx\shell\Install\command" /v "" /t REG_SZ /d "PowerShell -ExecutionPolicy Bypass \"Add-AppxPackage '%1'\"" /f >nul reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /v "MUIVerb" /t REG_SZ /d "Установить" /f >nul reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /v "Icon" /t REG_SZ /d "C:\Windows\System32\shell32.dll,296" /f >nul reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install\command" /v "" /t REG_SZ /d "PowerShell -ExecutionPolicy Bypass \"Add-AppxPackage '%1'\"" /f >nul rem ----------------------------------------------------------------------------------------------------------------------------------------------------- rem Удалить пункты reg delete "HKCR\SystemFileAssociations\.Appx\shell\Install" /f >nul>2&1 reg delete "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /f >nul>2&1
 
reg add "HKCR\SystemFileAssociations\.Appx\shell\Install" /v "MUIVerb" /t REG_SZ /d "Установить" /f >nul
reg add "HKCR\SystemFileAssociations\.Appx\shell\Install" /v "Icon" /t REG_SZ /d "C:\Windows\System32\shell32.dll,296" /f >nul
reg add "HKCR\SystemFileAssociations\.Appx\shell\Install\command" /v "" /t REG_SZ /d "PowerShell -ExecutionPolicy Bypass \"Add-AppxPackage '%1'\"" /f >nul

reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /v "MUIVerb" /t REG_SZ /d "Установить" /f >nul
reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /v "Icon" /t REG_SZ /d "C:\Windows\System32\shell32.dll,296" /f >nul
reg add "HKCR\SystemFileAssociations\.AppxBundle\shell\Install\command" /v "" /t REG_SZ /d "PowerShell -ExecutionPolicy Bypass \"Add-AppxPackage '%1'\"" /f >nul
rem -----------------------------------------------------------------------------------------------------------------------------------------------------
rem Удалить пункты
reg delete "HKCR\SystemFileAssociations\.Appx\shell\Install" /f >nul>2&1
reg delete "HKCR\SystemFileAssociations\.AppxBundle\shell\Install" /f >nul>2&1

 

Круто! Большое Спасибо!