diff --git a/CopyFilesToVM.ps1 b/CopyFilesToVM.ps1
index b59d345..eea124b 100644
--- a/CopyFilesToVM.ps1
+++ b/CopyFilesToVM.ps1
@@ -1,37 +1,17 @@
-function add-gpo-modifications {
-param(
-[string]$DriveLetter
-)
- $querygpt = Get-content $DriveLetter\Windows\System32\GroupPolicy\gpt.ini
- $matchgpt = $querygpt -match '{42B5FAAE-6536-11D2-AE5A-0000F87571E3}{40B6664F-4972-11D1-A7CA-0000F87571E3}'
- if ($matchgpt -contains "*0000F87571E3*" -eq $false) {
- $gptstring = get-content $DriveLetter\Windows\System32\GroupPolicy\gpt.ini
- $gpoversion = $gptstring -match "Version"
- $GPO = $gptstring -match "gPCMachineExtensionNames"
- $add = '[{42B5FAAE-6536-11D2-AE5A-0000F87571E3}{40B6664F-4972-11D1-A7CA-0000F87571E3}]'
- $replace = "$GPO" + "$add"
- (Get-Content "$DriveLetter\Windows\System32\GroupPolicy\gpt.ini").Replace("$GPO","$replace") | Set-Content "$DriveLetter\Windows\System32\GroupPolicy\gpt.ini"
- [int]$i = $gpoversion.trim("Version=")
- [int]$n = $gpoversion.trim("Version=")
- $n +=2
- (Get-Content $DriveLetter\Windows\System32\GroupPolicy\gpt.ini) -replace "Version=$i", "Version=$n" | Set-Content $DriveLetter\Windows\System32\GroupPolicy\gpt.ini
- }
- else{
- write-output "Not Required"
- }
- }
+
Function Setup-ParsecInstall {
param(
[string]$DriveLetter
)
- add-gpo-modifications -DriveLetter $DriveLetter
+
if((Test-Path -Path $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts\Startup) -eq $true) {} Else {New-Item -Path $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts\Startup -ItemType directory | Out-Null}
if((Test-Path -Path $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts\Shutdown) -eq $true) {} Else {New-Item -Path $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts\Shutdown -ItemType directory | Out-Null}
if((Test-Path -Path $DriveLetter\ProgramData\Easy-GPU-P) -eq $true) {} Else {New-Item -Path $DriveLetter\ProgramData\Easy-GPU-P -ItemType directory | Out-Null}
- Move-Item -Path $psscriptroot\psscripts.ini -Destination $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts
- Move-Item -Path $psscriptroot\Install.ps1 -Destination $DriveLetter\Windows\system32\GroupPolicy\Machine\Scripts\Startup
- Move-Item -Path $psscriptroot\parsecpublic.cer -Destination $DriveLetter\ProgramData\Easy-GPU-P
+ Copy-Item -Path $psscriptroot\gpt.ini -Destination $DriveLetter\Windows\system32\GroupPolicy
+ Copy-Item -Path $psscriptroot\psscripts.ini -Destination $DriveLetter\Windows\system32\GroupPolicy\User\Scripts
+ Copy-Item -Path $psscriptroot\Install.ps1 -Destination $DriveLetter\Windows\system32\GroupPolicy\User\Scripts\Logon
+ Copy-Item -Path $psscriptroot\parsecpublic.cer -Destination $DriveLetter\ProgramData\Easy-GPU-P
}
diff --git a/autounattend.xml b/autounattend.xml
index 22add2b..6d21a80 100644
--- a/autounattend.xml
+++ b/autounattend.xml
@@ -4,7 +4,7 @@ Created using Windows AFG found at:
;http://www.windowsafg.com
Installation Notes
-Location: United States
+Location:
Notes: Enter your comments here...
**************************************************-->
@@ -19,7 +19,7 @@ Notes: Enter your comments here...
en-US
en-US
en-US
-en-US
+en-AU
@@ -77,7 +77,7 @@ Notes: Enter your comments here...
4
4
-
+
C
NTFS
@@ -119,45 +119,31 @@ Notes: Enter your comments here...
0409:00000409
-en-US
-en-US
-en-US
-en-US
+en-AU
+en-AU
+en-AU
+en-AU
true
-1
+0
-GPU-P
+-PC
W269N-WFGWX-YVC9B-4J6C9-T83GX
-
-
-
-
- CoolPassword!:)
- true
-
- Test account
- GPU-P
- Administrators
- GPU-P
-
-
-
CoolPassword!:)
true
true
-GPUP
+GPU-P
true
@@ -169,30 +155,50 @@ Notes: Enter your comments here...
true
1
+
+
+
+
+CoolPassword!:)
+true
+
+
+GPU-P
+Administrators
+GPU-P
+
+
+
GPU-P
false
-Control Panel View
+Allow Scripts
1
-reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v StartupPage /t REG_DWORD /d 0 /f
-true
-
-
-2
-Control Panel Icon Size
+reg add HKLM\Software\Policies\Microsoft\Windows\Powershell
false
-reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v AllItemsIconView /t REG_DWORD /d 0 /f
+Allow Scripts
+2
+reg add HKLM\Software\Policies\Microsoft\Windows\Powershell /v ExecutionPolicy /t REG_MULTI_SZ /d Unrestricted
+false
+
+
+Allow Scripts
3
+reg add HKLM\Software\Policies\Microsoft\Windows\Powershell /v EnableScripts /t REG_DWORD /d 1
+false
+
+
+4
false
cmd /C wmic useraccount where name="GPU-P" set PasswordExpires=false
Password Never Expires
-Eastern Standard Time
+GTB Standard Time
-
+
\ No newline at end of file
diff --git a/gpt.ini b/gpt.ini
index 4e41c3c..01c6ad7 100644
--- a/gpt.ini
+++ b/gpt.ini
@@ -1,3 +1,3 @@
[General]
-gPCMachineExtensionNames=[{42B5FAAE-6536-11D2-AE5A-0000F87571E3}{40B6664F-4972-11D1-A7CA-0000F87571E3}]
-Version=4
\ No newline at end of file
+gPCUserExtensionNames=[{42B5FAAE-6536-11D2-AE5A-0000F87571E3}{40B66650-4972-11D1-A7CA-0000F87571E3}]
+Version=131072
\ No newline at end of file
diff --git a/psscripts.ini b/psscripts.ini
index 25e56e3..52d1a45 100644
--- a/psscripts.ini
+++ b/psscripts.ini
@@ -1,4 +1,4 @@
-[Startup]
-0CmdLine=c:\Windows\system32\GroupPolicy\Machine\Scripts\Startup\Install.ps1
+[Logon]
+0CmdLine=Install.ps1
0Parameters=
\ No newline at end of file