2
2
layout: none
3
3
sitemap: false
4
4
---
5
- $DownloadURL = ' https://github.com/ovsky/ghost-open-toolbox/archive/refs/heads/complete.zip'
5
+ if (-NOT ([Security.Principal.WindowsPrincipal ] [Security.Principal.WindowsIdentity ]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole ] " Administrator" )) {
6
+ Write-Host " The script has to be run as an administrator"
7
+ Read-Host - Prompt " Press any key to exit."
8
+ Return
9
+ }
10
+
11
+ $DownloadURL = ' https://github.com/shomykohai/ghost-toolbox-src/archive/refs/heads/main.zip'
6
12
7
13
$FilePath = " $env: TEMP \ghost_toolbox.zip"
8
14
@@ -15,26 +21,37 @@ catch {
15
21
}
16
22
17
23
Expand-Archive - Force $FilePath - DestinationPath $env: TEMP \ghost_toolbox;
18
- Set-Location " $env: TEMP \ghost_toolbox\ghost-open- toolbox-complete "
24
+ Set-Location " $env: TEMP \ghost_toolbox\ghost-toolbox-src-main "
19
25
if (Test-Path " C:\Ghost Toolbox" ){
26
+ Write-Host " Found another instance of Ghost Toolbox directory."
27
+ Write-Host " Removing old Ghost Toolbox."
20
28
Remove-Item " C:\Ghost Toolbox" - Recurse
21
29
}
30
+ Write-Host " Creating new Ghost Toolbox directory."
22
31
New-Item - ItemType Directory - Path " C:\Ghost Toolbox"
23
- Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-open-toolbox-complete\wget" - Destination " C:\Ghost Toolbox" - Recurse
24
- Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-open-toolbox-complete\toolbox.updater.x64.exe" - Destination " C:\Ghost Toolbox"
25
- Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-open-toolbox-complete\VCRUNTIME140_1D.dll" - Destination " C:\Ghost Toolbox"
26
- Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-open-toolbox-complete\VCRUNTIME140D.dll" - Destination " C:\Ghost Toolbox"
27
- Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-open-toolbox-complete\MSVCP140D.dll" - Destination " C:\Ghost Toolbox"
28
- Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-open-toolbox-complete\ucrtbased.dll" - Destination " C:\Ghost Toolbox"
29
- Start-Process PowerShell - Verb runAs - ArgumentList ' -command Copy-Item $env:TEMP\ghost_toolbox\ghost-open-toolbox-complete\run.ghost.cmd C:\Windows\System32\migwiz\dlmanifests\run.ghost.cmd -Force'
30
- Start-Process PowerShell - Verb runAs - ArgumentList ' -command Copy-Item $env:TEMP\ghost_toolbox\ghost-open-toolbox-complete\nhcolor.exe C:\Windows\System32\nhcolor.exe -Force'
32
+ Write-Host " Copying files..."
33
+ Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-toolbox-src-main\wget" - Destination " C:\Ghost Toolbox" - Recurse
34
+ Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-toolbox-src-main\toolbox.updater.x64.exe" - Destination " C:\Ghost Toolbox"
35
+ Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-toolbox-src-main\run.ghost.cmd" - Destination " C:\Windows\System32\migwiz\dlmanifests\run.ghost.cmd" - Force
36
+ Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-toolbox-src-main\nhcolor.exe" - Destination " C:\Windows\System32\nhcolor.exe" - Force
37
+ Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-toolbox-src-main\ucrtbased.dll" - Destination " C:\Windows\System32\ucrtbased.dll" - Force
38
+ Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-toolbox-src-main\vcruntime140_1d.dll" - Destination " C:\Windows\System32\vcruntime140_1d.dll" - Force
39
+ Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-toolbox-src-main\vcruntime140d.dll" - Destination " C:\Windows\System32\vcruntime140d.dll" - Force
40
+ Copy-Item - Path " $env: TEMP \ghost_toolbox\ghost-toolbox-src-main\msvcp140d.dll" - Destination " C:\Windows\System32\msvcp140d.dll" - Force
41
+
42
+
43
+ Write-Host " Gaining SE Edition privileges..."
31
44
if ((Test-Path - LiteralPath " HKLM:\SOFTWARE\WOW6432Node\GhostSpectre" ) -ne $true )
32
45
{
33
46
New-Item " HKLM:\SOFTWARE\WOW6432Node\GhostSpectre" - force - ea SilentlyContinue
34
47
};
35
48
New-ItemProperty - LiteralPath ' HKLM:\SOFTWARE\WOW6432Node\GhostSpectre' - Name ' Edition' - Value ' SUPERLITE SE' - PropertyType String - Force - ea SilentlyContinue;
36
- New-ItemProperty - LiteralPath ' HKLM:\SOFTWARE\WOW6432Node\GhostSpectre' - Name ' Ghost_Revision' - Value ' 11 ' - PropertyType String - Force - ea SilentlyContinue;
49
+ New-ItemProperty - LiteralPath ' HKLM:\SOFTWARE\WOW6432Node\GhostSpectre' - Name ' Ghost_Revision' - Value ' 17 ' - PropertyType String - Force - ea SilentlyContinue;
37
50
New-ItemProperty - LiteralPath ' HKLM:\SOFTWARE\WOW6432Node\GhostSpectre' - Name ' Check_Update' - Value 0 - PropertyType DWord - Force - ea SilentlyContinue;
38
51
Set-Location $env: TEMP
52
+ Write-Host " Cleanup..."
39
53
Remove-Item " $env: TEMP \ghost_toolbox" - Recurse
40
54
Remove-Item $FilePath
55
+
56
+ Write-Host " Done."
57
+ Read-Host - Prompt " Press any key to exit."
0 commit comments