Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Improve check for developer mode by checking minimum required build n…
…umber

The test would fail if the developer mode is enabled but the machine has an older build than the minimum required build.
The change adds a check for the build version in the test.
  • Loading branch information
adityapatwardhan committed Jan 25, 2019
commit 961d585ffb82d8b592abedba60bb90322cee049e
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,9 @@ Describe "New-Item with links fails for non elevated user if developer mode not
$testlink = "testlink"
$FullyQualifiedFile = Join-Path -Path $TestDrive -ChildPath $testfile
$TestFilePath = Join-Path -Path $TestDrive -ChildPath $testlink
$developerMode = (Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock -ErrorAction SilentlyContinue).AllowDevelopmentWithoutDevLicense -eq 1
$developerModeEnabled = (Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock -ErrorAction SilentlyContinue).AllowDevelopmentWithoutDevLicense -eq 1
$minBuildRequired = ([System.Environment]::OSVersion.Version.Major -eq 10 -and [System.Environment]::OSVersion.Version.Build -ge 14972) -or ([System.Environment]::OSVersion.Version.Major -ge 11)
Comment thread
adityapatwardhan marked this conversation as resolved.
Outdated
$developerMode = $developerModeEnabled -and $minBuildRequired
}

AfterEach {
Expand Down