-
Notifications
You must be signed in to change notification settings - Fork 206
Expand file tree
/
Copy pathAlwaysInstallElevated.ps1
More file actions
32 lines (23 loc) · 1.59 KB
/
Copy pathAlwaysInstallElevated.ps1
File metadata and controls
32 lines (23 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$global:version = "1.0.0"
$ascii = @"
.____ .__ .____ ___. _________ __
| | ____ ____ _____ | | | | _____ \_ |__ / _____/ _____/ |_ __ ________
| | / _ \_/ ___\\__ \ | | ______ | | \__ \ | __ \ \_____ \_/ __ \ __\ | \____ \
| |__( <_> ) \___ / __ \| |__ /_____/ | |___ / __ \| \_\ \/ \ ___/| | | | / |_> >
|_______ \____/ \___ >____ /____/ |_______ (____ /___ /_______ /\___ >__| |____/| __/
\/ \/ \/ \/ \/ \/ \/ \/ |__|
~ Created with <3 by @nickvourd
~ Version: $global:version
~ Type: AlwaysInstallElevated
"@
Write-Host $ascii`n
Write-Host "[+] Configuring HKEY_LOCAL_MACHINE registry`n"
#Create a new key in HKEY_LOCAL_MACHINE registry
New-Item -Path "Registry::\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer"
#Create a new DWORD (32-Bit) Value and insert hex data
New-ItemProperty -Path "Registry::\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer" -Name "AlwaysInstallElevated" -PropertyType DWORD -Value 0x00000001
Write-Host "`n[+] Configuring HKEY_CURRENT_USER registry`n"
#Create a new key in HKEY_CURRENT_USER registry
New-Item -Path "Registry::\HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Installer"
#Create a new DWORD (32-Bit) Value and insert hex data
New-ItemProperty -Path "Registry::\HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Installer" -Name "AlwaysInstallElevated" -PropertyType DWORD -Value 0x00000001