how to run cmd run administrator using script
@echo off
break off
title C:\Windows\system32\cmd.exe
cls
:cmd
set /p cmd=C:\Enter Command:
%cmd%
echo.
goto cmd
Set objShell = CreateObject(“Shell.Application”)
Set objWshShell = WScript.CreateObject(“WScript.Shell”)
Set objWshProcessEnv = objWshShell.Environment(“PROCESS”)
objShell.ShellExecute “C:\Windows\system32\cmd.exe”, “/k”, “”, “runas”
if "%~s0"=="%~s1" ( cd %~sp1 & shift ) else (
echo CreateObject^("Shell.Application"^).ShellExecute "%~s0","%~0 %*","","runas",1 >"%tmp%%~n0.vbs" & "%tmp%%~n0.vbs" & del /q "%tmp%%~n0.vbs" & goto :eof
)
Also in C++:
- install vscode for ubuntu
- how to install rpm on linux
- regex final word
- create and go to branch
- how to create a mongo db database digital ocean nginx
- install redis brew
- git config list
- github merge
- git delete local branch
- docker remove all images
- find all variables in server bash
- dialog shell script example
- install ruby environment on ubuntu 20.04
- get log from a docker machine
- alpine install psql
- switch installed linx to wsl2
- how to install whatsapp on manjaro linux
- host file in ubuntu
- bash chmod
- how to install git lfs on mac
- docker engine install ubuntu
- how to check user in group linux
- advanced installer product key
- how log in kali linux