File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040 [string ]$WinGet
4141 )
4242
43- if ($null -eq $WinGet ) {
43+ if ($WinGet -eq " No " ) {
4444 Write-Output = " WinGet is not installed, downloading and installing WinGet..."
4545 }
4646 else {
Original file line number Diff line number Diff line change 5454 # Collects everything in pscustomobject to get easier access to the information
5555 [System.Object ]$SysInfo = [PSCustomObject ]@ {
5656 VCLibs = $ (Get-AppxPackage - Name " Microsoft.VCLibs.140.00" - AllUsers | Where-Object { $_.Architecture -eq $Arch })
57- WinGet = $ (try { (Get-AppxPackage - Name Microsoft.DesktopAppInstaller).version } catch { $Null })
57+ WinGet = $ (try { (Get-AppxPackage - Name Microsoft.DesktopAppInstaller).version } catch { " No " })
5858 VisualCRedistUrl = $VisualCRedistUrl
5959 $VCLibsUrl = $VCLibsUrl
6060 Arch = $Arch
Original file line number Diff line number Diff line change 6666 [System.Object ]$SysInfo = Get-RSInstallInfo
6767
6868 # If user has choosen to skip the WinGet version don't check, if WinGet is not installed this will install WinGet anyway.
69- if ($SkipVersionCheck -eq $false -or $null -eq $SysInfo .WinGet ) {
70- Confirm-RSWinGet - GitHubUrl $GitHubUrl - GithubHeaders $GithubHeaders
69+ if ($SkipVersionCheck -eq $false -or $SysInfo .WinGet -eq " No " ) {
70+ Confirm-RSWinGet - GitHubUrl $GitHubUrl - GithubHeaders $GithubHeaders - WinGet $SysInfo .WinGet
7171 }
7272
7373 # If VCLibs are not installed it will get installed
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ Function Update-RSWinSoftware {
8989 [System.Object ]$SysInfo = Get-RSInstallInfo
9090
9191 # If user has choosen to skip the WinGet version don't check, if WinGet is not installed this will install WinGet anyway.
92- if ($SkipVersionCheck -eq $false -or $null -eq $SysInfo .WinGet ) {
93- Confirm-RSWinGet - GitHubUrl $GitHubUrl - GithubHeaders $GithubHeaders
92+ if ($SkipVersionCheck -eq $false -or $SysInfo .WinGet -eq " No " ) {
93+ Confirm-RSWinGet - GitHubUrl $GitHubUrl - GithubHeaders $GithubHeaders - WinGet $SysInfo .WinGet
9494 }
9595
9696 # If VCLibs are not installed it will get installed
@@ -143,7 +143,7 @@ Function Confirm-RSWinGet {
143143 [string ]$WinGet
144144 )
145145
146- if ($null -eq $WinGet ) {
146+ if ($WinGet -eq " No " ) {
147147 Write-Output = " WinGet is not installed, downloading and installing WinGet..."
148148 }
149149 else {
@@ -244,7 +244,7 @@ Function Get-RSInstallInfo {
244244 # Collects everything in pscustomobject to get easier access to the information
245245 [System.Object ]$SysInfo = [PSCustomObject ]@ {
246246 VCLibs = $ (Get-AppxPackage - Name " Microsoft.VCLibs.140.00" - AllUsers | Where-Object { $_.Architecture -eq $Arch })
247- WinGet = $ (try { (Get-AppxPackage - Name Microsoft.DesktopAppInstaller).version } catch { $Null })
247+ WinGet = $ (try { (Get-AppxPackage - Name Microsoft.DesktopAppInstaller).version } catch { " No " })
248248 VisualCRedistUrl = $VisualCRedistUrl
249249 $VCLibsUrl = $VCLibsUrl
250250 Arch = $Arch
You can’t perform that action at this time.
0 commit comments