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

Бат файл для запуска от имени системы

Всем привет, недавно написал бат файл для запуска от имени системы

Сделал ещё добавление в контекстное меню
!!!ВНИМАНИЕ!!!
1) На скрипт ругается Антивирус
2)Скрипт при установке в контекстное меню создаёт копию cmd под названием cmda и добавляя для неё запуск от имени администратора 

В архиве лежит whoami.cmd для проверки запуска от имени системы из контекстного меню
А также простой запуск cmd от имени системы без добавление в контекст.меню
Ссылка

Лайкнули XpucT, Vlado и Alt
XpucTVladoAlt

Привет 🖐
А если нужно запустить, например, реестр, то нужно идти к файлу regedit.exe?

В любой непонятной ситуации переходи на beta  © Win 10 Tweaker
Цитата: XpucT от 06.06.2022, 00:31

Привет 🖐
А если нужно запустить, например, реестр, то нужно идти к файлу regedit.exe?

Доброй ночи
Увы это так, как бы я не старался изменить скрипт он выдавал ошибку, завтра попробую переделать если получится, то напишу сюда
Хотя может я не так всё понял, но как вы хотите чтобы запускался реестр от имени системы?, можно создать ярлык и кликая по нему нажать кнопку запустить имени системы

Лайкнул XpucT
XpucT
Цитата: MSC от 06.06.2022, 00:23

Всем привет, недавно написал бат файл для запуска от имени системы

Сделал ещё добавление в контекстное меню
!!!ВНИМАНИЕ!!!
1) На скрипт ругается Антивирус
2)Скрипт при установке в контекстное меню создаёт копию cmd под названием cmda и добавляя для неё запуск от имени администратора 

В архиве лежит whoami.cmd для проверки запуска от имени системы из контекстного меню
А также простой запуск cmd от имени системы без добавление в контекст.меню
Ссылка

Привет, здорово.
Есть RunAsTI, который позволяет также запускать regedit, cmd, exe, бат и все остальное от имени СИСТЕМЫ/TI
Смысл таков
Создается .bat файл

@echo off
rem Переходим в место, откуда запускается батник (если RunAsTI не скопирован в папку Windows)
cd /d "%~dp0"
rem Запуск .bat от имени TI
if /i not "%USERNAME%"=="SYSTEM" TI.exe "%~f0" %* & exit
rem Далее любой код в батнике выполяется от имени СИСТЕМЫ
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\1" /f >nul
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\1543534543543543" /f >nul
del /q 1.txt
блаблабла
pause
exit /b

Если нужны пункт к. меню , копируем RunAsTi.exe (в коде ниже TI.exe) в папку system32 и добавляем в контекстное меню рабочего стола такие пункты

Спойлер

@echo off

cd /d %~dp0
xcopy "TI.exe" "%SystemRoot%\system32" /q /y >nul

rem Добавляем пункт запуска от имени TI в .exe, .bat, .cmd
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul


reg add "HKCR\batfile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul


reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul


reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "MUIVerb" /t reg_SZ /d "TI..." /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "Position" /t reg_SZ /d "Top" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "SeparatorAfter" /t reg_SZ /d "" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "subcommands" /t reg_SZ /d "" /f >nul


reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit" /ve /t reg_SZ /d "Редактор реестра" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit" /v "Icon" /t reg_SZ /d "regedit.exe,0" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\regedit.exe\"" /f >nul


reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD" /ve /t reg_SZ /d "Командная строка" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD" /v "Icon" /t reg_SZ /d "imageres.dll,262" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\system32\cmd.exe\"" /f >nul


reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services" /ve /t reg_SZ /d "Системные службы" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services" /v "Icon" /t reg_SZ /d "filemgmt.dll,0" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services\command" /ve /t reg_SZ /d "TI.exe C:\Windows\System32\cmd.exe /c start services.msc && msg * /TIME:2 Службы запущены от имени TrustedInstaller. & taskkill /f /im cmd.exe" /f >nul


reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr" /ve /t reg_SZ /d "Диспетчер задач" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr" /v "Icon" /t reg_SZ /d "imageres.dll,144" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\system32\taskmgr.exe\"" /f >nul

 

Цитата: Vlado от 06.06.2022, 17:34
Цитата: MSC от 06.06.2022, 00:23

Всем привет, недавно написал бат файл для запуска от имени системы

Сделал ещё добавление в контекстное меню
!!!ВНИМАНИЕ!!!
1) На скрипт ругается Антивирус
2)Скрипт при установке в контекстное меню создаёт копию cmd под названием cmda и добавляя для неё запуск от имени администратора 

В архиве лежит whoami.cmd для проверки запуска от имени системы из контекстного меню
А также простой запуск cmd от имени системы без добавление в контекст.меню
Ссылка

Привет, здорово.
Есть RunAsTI, который позволяет также запускать regedit, cmd, exe, бат и все остальное от имени СИСТЕМЫ/TI
Смысл таков
Создается .bat файл

 
 
 
 
@echo off
rem Переходим в место, откуда запускается батник (если RunAsTI не скопирован в папку Windows)
cd /d "%~dp0"
rem Запуск .bat от имени TI
if /i not "%USERNAME%"=="SYSTEM" TI.exe "%~f0" %* & exit
rem Далее любой код в батнике выполяется от имени СИСТЕМЫ
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\1" /f >nul
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\1543534543543543" /f >nul
del /q 1.txt
блаблабла
pause
exit /b
@echo off rem Переходим в место, откуда запускается батник (если RunAsTI не скопирован в папку Windows) cd /d "%~dp0" rem Запуск .bat от имени TI if /i not "%USERNAME%"=="SYSTEM" TI.exe "%~f0" %* & exit rem Далее любой код в батнике выполяется от имени СИСТЕМЫ reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\1" /f >nul reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\1543534543543543" /f >nul del /q 1.txt блаблабла pause exit /b
 
@echo off
rem Переходим в место, откуда запускается батник (если RunAsTI не скопирован в папку Windows)
cd /d "%~dp0"
rem Запуск .bat от имени TI
if /i not "%USERNAME%"=="SYSTEM" TI.exe "%~f0" %* & exit
rem Далее любой код в батнике выполяется от имени СИСТЕМЫ
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\1" /f >nul
reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\1543534543543543" /f >nul
del /q 1.txt
блаблабла
pause
exit /b

Если нужны пункт к. меню , копируем RunAsTi.exe (в коде ниже TI.exe) в папку system32 и добавляем в контекстное меню рабочего стола такие пункты

Спойлер

 
 
 
 
@echo off
 
cd /d %~dp0
xcopy "TI.exe" "%SystemRoot%\system32" /q /y >nul
 
rem Добавляем пункт запуска от имени TI в .exe, .bat, .cmd
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul
 
 
reg add "HKCR\batfile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul
 
 
reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul
 
 
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "MUIVerb" /t reg_SZ /d "TI..." /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "Position" /t reg_SZ /d "Top" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "SeparatorAfter" /t reg_SZ /d "" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "subcommands" /t reg_SZ /d "" /f >nul
 
 
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit" /ve /t reg_SZ /d "Редактор реестра" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit" /v "Icon" /t reg_SZ /d "regedit.exe,0" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\regedit.exe\"" /f >nul
 
 
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD" /ve /t reg_SZ /d "Командная строка" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD" /v "Icon" /t reg_SZ /d "imageres.dll,262" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\system32\cmd.exe\"" /f >nul
 
 
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services" /ve /t reg_SZ /d "Системные службы" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services" /v "Icon" /t reg_SZ /d "filemgmt.dll,0" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services\command" /ve /t reg_SZ /d "TI.exe C:\Windows\System32\cmd.exe /c start services.msc && msg * /TIME:2 Службы запущены от имени TrustedInstaller. & taskkill /f /im cmd.exe" /f >nul
 
 
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr" /ve /t reg_SZ /d "Диспетчер задач" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr" /v "Icon" /t reg_SZ /d "imageres.dll,144" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\system32\taskmgr.exe\"" /f >nul
@echo off cd /d %~dp0 xcopy "TI.exe" "%SystemRoot%\system32" /q /y >nul rem Добавляем пункт запуска от имени TI в .exe, .bat, .cmd reg add "HKCR\exefile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul reg add "HKCR\exefile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul reg add "HKCR\exefile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul reg add "HKCR\exefile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul reg add "HKCR\exefile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul reg add "HKCR\batfile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul reg add "HKCR\batfile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul reg add "HKCR\batfile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul reg add "HKCR\batfile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul reg add "HKCR\batfile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul reg add "HKCR\cmdfile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "MUIVerb" /t reg_SZ /d "TI..." /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "Position" /t reg_SZ /d "Top" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "SeparatorAfter" /t reg_SZ /d "" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "subcommands" /t reg_SZ /d "" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit" /ve /t reg_SZ /d "Редактор реестра" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit" /v "Icon" /t reg_SZ /d "regedit.exe,0" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\regedit.exe\"" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD" /ve /t reg_SZ /d "Командная строка" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD" /v "Icon" /t reg_SZ /d "imageres.dll,262" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\system32\cmd.exe\"" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services" /ve /t reg_SZ /d "Системные службы" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services" /v "Icon" /t reg_SZ /d "filemgmt.dll,0" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services\command" /ve /t reg_SZ /d "TI.exe C:\Windows\System32\cmd.exe /c start services.msc && msg * /TIME:2 Службы запущены от имени TrustedInstaller. & taskkill /f /im cmd.exe" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr" /ve /t reg_SZ /d "Диспетчер задач" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr" /v "Icon" /t reg_SZ /d "imageres.dll,144" /f >nul reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\system32\taskmgr.exe\"" /f >nul
 
@echo off

cd /d %~dp0
xcopy "TI.exe" "%SystemRoot%\system32" /q /y >nul

rem Добавляем пункт запуска от имени TI в .exe, .bat, .cmd
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul
reg add "HKCR\exefile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul


reg add "HKCR\batfile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul
reg add "HKCR\batfile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul


reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "Description" /t reg_SZ /d "Run as TrustedInstaller" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller" /v "MUIVerb" /t reg_SZ /d "Запуск от имени TrustedInstaller" /f >nul
reg add "HKCR\cmdfile\shell\runastrustedinstaller\command" /v "" /t reg_SZ /d "TI.exe \"%%1\"" /f >nul


reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "Icon" /t reg_SZ /d "imageres.dll,1" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "MUIVerb" /t reg_SZ /d "TI..." /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "Position" /t reg_SZ /d "Top" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "SeparatorAfter" /t reg_SZ /d "" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller" /v "subcommands" /t reg_SZ /d "" /f >nul


reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit" /ve /t reg_SZ /d "Редактор реестра" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit" /v "Icon" /t reg_SZ /d "regedit.exe,0" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\regEdit\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\regedit.exe\"" /f >nul


reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD" /ve /t reg_SZ /d "Командная строка" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD" /v "Icon" /t reg_SZ /d "imageres.dll,262" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\CMD\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\system32\cmd.exe\"" /f >nul


reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services" /ve /t reg_SZ /d "Системные службы" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services" /v "Icon" /t reg_SZ /d "filemgmt.dll,0" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Services\command" /ve /t reg_SZ /d "TI.exe C:\Windows\System32\cmd.exe /c start services.msc && msg * /TIME:2 Службы запущены от имени TrustedInstaller. & taskkill /f /im cmd.exe" /f >nul


reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr" /ve /t reg_SZ /d "Диспетчер задач" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr" /v "Icon" /t reg_SZ /d "imageres.dll,144" /f >nul
reg add "HKLM\SOFTWARE\Classes\DesktopBackground\Shell\TrustedInstaller\Shell\Taskmgr\command" /ve /t reg_SZ /d "TI.exe \"C:\Windows\system32\taskmgr.exe\"" /f >nul

 

Добрый день
RunAsTI конечно хорошая программа(Сам пользуюсь PowerRun ), но без других программ в винде лучше, да и кто знает что может быть в программе.
Можно конечно мой код пересобрать, и другие варианты вписать
И ещё вопрос, почему у вас код находится в HKLM\SOFTWARE\Classes\DesktopBackground, он чем-то отличается от HKCR\DesktopBackground ?

Цитата: MSC от 06.06.2022, 19:49

Добрый день

Доброго.

RunAsTI конечно хорошая программа(Сам пользуюсь PowerRun )

PowerRun чуть дольше соображает и выполняет команды в .BAT

но без других программ в винде лучше, да и кто знает что может быть в программе.

Пользуюсь уже долгое время и коллеги, проблем нет, обычная консоль CMD.

И ещё вопрос, почему у вас код находится в HKLM\SOFTWARE\Classes\DesktopBackground, он чем-то отличается от HKCR\DesktopBackground ?

Можно добавлять сразу в HKCR. Информация все равно дублируется в HKLM.

 

Лайкнули 𝐅𝐫𝐨𝐦𝐇𝐞𝐥𝐥 и En32
𝐅𝐫𝐨𝐦𝐇𝐞𝐥𝐥En32

Всем привет, недавно я нашёл этот скрипт и с новыми силами я полностью его переписал из-за чего 
Стало доступно:
Если просто запустить файл то откроется cmd
Запуск любого файла как аргумент
Удаление(убийство) окна cmd на заднем плане(в принципе костыль)
Также можно запустить любой батник просто перенеся на файл запуска TI.bat(не поддерживает пробелы в словах и путях)

В будущем:

Исправить костыль убийства окна
Добавить поддержку пробелов в словах и путях

Скачать

Добрый вечер, наконец мучаясь целый день с моим скриптом.
Я наконец смог Добавить поддержку пробелов в словах и путях
Всё остальное осталось на своих местах
Прошу проверьте пожалуйста этот скрипт кому не лень.
!!!ВНИМАНИЕ!!!
 На скрипт ругается Антивирус

В будущем:
Исправить костыль убийства окна

Скачать

Добрый🖐.
Вроде работает, но мне не удобно, TI от Vlado, которым где-то делился, не помню где =), удобно, просто и понятно.

Лайкнул En32
En32
«Любой дурак может знать. Дело в том, чтобы понять.» — Альберт Эйнштейн