From b6f74494dcf496f30ffae5e80d3f34ad67944260 Mon Sep 17 00:00:00 2001 From: Isaac Shoebottom Date: Thu, 26 Oct 2023 09:26:17 -0300 Subject: [PATCH] Add cyberpunk autoupdate toggle --- CyberpunkAutoupdate/CyberpunkUpdate.ps1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 CyberpunkAutoupdate/CyberpunkUpdate.ps1 diff --git a/CyberpunkAutoupdate/CyberpunkUpdate.ps1 b/CyberpunkAutoupdate/CyberpunkUpdate.ps1 new file mode 100644 index 0000000..7e90b1e --- /dev/null +++ b/CyberpunkAutoupdate/CyberpunkUpdate.ps1 @@ -0,0 +1,14 @@ +# Store manifest variable +$Manifest = "H:\Games\Steam\steamapps\appmanifest_1091500.acf" + +# Get the read only attribute +$ReadOnly = (Get-Item $Manifest).IsReadOnly + +# If the file is read only, remove the read only attribute, If the file is not read only, set the read only attribute +If ($ReadOnly) {Set-ItemProperty $Manifest -Name IsReadOnly -Value $false} Else {Set-ItemProperty $Manifest -Name IsReadOnly -Value $true} + +# Display the read only attribute for reference +Write-Host "Manifest file's read only attribute is now $((Get-Item $Manifest).IsReadOnly)" + +# Pause the script to see the output +Read-Host -Prompt "Press Enter to exit" \ No newline at end of file