This repository was archived by the owner on Oct 15, 2025. It is now read-only.
Description When trying to run the script, it complains about a zero-length string, but continues nevertheless.
Exception calling "Replace" with "2" argument(s): "String cannot be of zero length.
Parameter name: oldValue"
At C:\Users\User1\Downloads\Parsec-Cloud-Preparation-Tool\Parsec-Cloud-Preparation-Tool-master\PostInstall\PostInstall.
ps1:395 char:9
+ (Get-Content "C:\Windows\System32\GroupPolicy\gpt.ini").Repla ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentException
It seems like $GPO is empty.
$GPO = $gptstring -match " gPCMachineExtensionNames"
$add = ' [{42B5FAAE-6536-11D2-AE5A-0000F87571E3}{40B6664F-4972-11D1-A7CA-0000F87571E3}]'
$replace = " $GPO " + " $add "
(Get-Content " C:\Windows\System32\GroupPolicy\gpt.ini" ).Replace(" $GPO " , " $replace " ) | Set-Content " C:\Windows\System32\GroupPolicy\gpt.ini"
[int ]$i = $gpoversion.trim (" Version=" )
[int ]$n = $gpoversion.trim (" Version=" )
I ran the instructions from the README:
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
$ScriptWebArchive = "https://github.com/parsec-cloud/Parsec-Cloud-Preparation-Tool/archive/master.zip"
$LocalArchivePath = "$ENV:UserProfile\Downloads\Parsec-Cloud-Preparation-Tool"
(New-Object System.Net.WebClient).DownloadFile($ScriptWebArchive, "$LocalArchivePath.zip")
Expand-Archive "$LocalArchivePath.zip" -DestinationPath $LocalArchivePath -Force
CD $LocalArchivePath\Parsec-Cloud-Preparation-Tool-master\PostInstall
powershell.exe .\PostInstall.ps1 -DontPromptPasswordUpdateGPU
Reactions are currently unavailable
When trying to run the script, it complains about a zero-length string, but continues nevertheless.
It seems like
$GPOis empty.Parsec-Cloud-Preparation-Tool/PostInstall/PostInstall.ps1
Lines 392 to 397 in 3a409b8
I ran the instructions from the README: