Skip to content

Instantly share code, notes, and snippets.

@ulrikstrid
Created February 13, 2019 13:51
Show Gist options
  • Save ulrikstrid/a6cc5034c99c7a24ec358b5ae238646d to your computer and use it in GitHub Desktop.
Save ulrikstrid/a6cc5034c99c7a24ec358b5ae238646d to your computer and use it in GitHub Desktop.
steps:
- script: |
Test-Path HKLM:System\CurrentControlSet\Control\FileSystem
Write-Host Getting long path registry value...
Get-ItemProperty -Path HKLM:System\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled
Write-Host Setting long path registry value...
Set-ItemProperty -Path HKLM:System\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled -Value 1
Write-Host New Value
Get-ItemProperty -Path HKLM:System\CurrentControlSet\Control\FileSystem -Name LongPathsEnabled
Write-Host DONE $LastExitCode
displayName: SetLongPathRegistry.ps1
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment