-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a system for testing correlation E2E #2071
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,6 +270,9 @@ namespace Microsoft.Management.Deployment | |
{ | ||
/// Checks if this package version has at least one applicable installer. | ||
Boolean HasApplicableInstaller(InstallOptions options); | ||
|
||
/// Gets the publisher string for this package version, if one is available. | ||
String Publisher { get; }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Add a comment. Seems like most other things here are documented.
florelis marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to do any review for these API changes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not for these simple ones, no.
florelis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
/// DESIGN NOTE: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
Param( | ||
[String] $DesktopAppInstallerPath, | ||
[String[]] $DesktopAppInstallerDependencyPath, | ||
[String] $PackageIdentifier, | ||
[String] $SourceName, | ||
[String] $OutputPath, | ||
[Switch] $UseDev | ||
) | ||
|
||
function Get-ARPTable { | ||
$registry_paths = @('HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*','HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*') | ||
return Get-ItemProperty $registry_paths -ErrorAction SilentlyContinue | | ||
Select-Object DisplayName, DisplayVersion, Publisher, @{N='ProductCode'; E={$_.PSChildName}} | | ||
Where-Object {$null -ne $_.DisplayName } | ||
} | ||
|
||
$ProgressPreference = 'SilentlyContinue' | ||
|
||
$desktopPath = "C:\Users\WDAGUtilityAccount\Desktop" | ||
|
||
$regFilesDirPath = Join-Path $desktopPath "RegFiles" | ||
|
||
if (Test-Path $regFilesDirPath) | ||
{ | ||
foreach ($regFile in (Get-ChildItem $regFilesDirPath)) | ||
{ | ||
|
||
Write-Host @" | ||
--> Importing reg file $($regFile.FullName) | ||
"@ | ||
reg import $($regFile.FullName) | ||
} | ||
} | ||
|
||
Write-Host @" | ||
--> Installing WinGet | ||
|
||
"@ | ||
|
||
if ($UseDev) | ||
{ | ||
foreach($dependency in $DesktopAppInstallerDependencyPath) | ||
{ | ||
Write-Host @" | ||
----> Installing $dependency | ||
"@ | ||
Add-AppxPackage -Path $dependency | ||
} | ||
|
||
Write-Host @" | ||
----> Enabling dev mode | ||
"@ | ||
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1" | ||
|
||
$devPackageManifestPath = Join-Path $desktopPath "DevPackage\AppxManifest.xml" | ||
Write-Host @" | ||
----> Installing $devPackageManifestPath | ||
"@ | ||
Add-AppxPackage -Path $devPackageManifestPath -Register | ||
} | ||
else | ||
{ | ||
Add-AppxPackage -Path $DesktopAppInstallerPath -DependencyPath $DesktopAppInstallerDependencyPath | ||
} | ||
|
||
$originalARP = Get-ARPTable | ||
|
||
Write-Host @" | ||
|
||
--> Installing $PackageIdentifier | ||
|
||
"@ | ||
|
||
$installAndCorrelateOutPath = Join-Path $OutputPath "install_and_correlate.json" | ||
|
||
$installAndCorrelationExpression = Join-Path $desktopPath "InstallAndCheckCorrelation\InstallAndCheckCorrelation.exe" | ||
$installAndCorrelationExpression = -join($installAndCorrelationExpression, ' -id "', $PackageIdentifier, '" -src "', $SourceName, '" -out "', $installAndCorrelateOutPath, '"') | ||
|
||
if ($UseDev) | ||
{ | ||
$installAndCorrelationExpression = -join($installAndCorrelationExpression, ' -dev') | ||
} | ||
|
||
Invoke-Expression $installAndCorrelationExpression | ||
|
||
Write-Host @" | ||
|
||
--> Copying logs | ||
"@ | ||
|
||
if ($UseDev) | ||
{ | ||
Copy-Item -Recurse (Join-Path $env:LOCALAPPDATA "Packages\WinGetDevCLI_8wekyb3d8bbwe\LocalState\DiagOutputDir") $OutputPath | ||
} | ||
else | ||
{ | ||
Copy-Item -Recurse (Join-Path $env:LOCALAPPDATA "Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir") $OutputPath | ||
} | ||
|
||
|
||
Write-Host @" | ||
|
||
--> Comparing ARP Entries | ||
"@ | ||
|
||
$arpCompared = (Compare-Object (Get-ARPTable) $originalARP -Property DisplayName,DisplayVersion,Publisher,ProductCode) | ||
$arpCompared | Select-Object -Property * -ExcludeProperty SideIndicator | Format-Table | ||
|
||
$arpCompared | Select-Object -Property * -ExcludeProperty SideIndicator | Format-Table | Out-File (Join-Path $OutputPath "ARPCompare.txt") | ||
|
||
"Done" | Out-File (Join-Path $OutputPath "done.txt") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This won't happen if there is any error during the script, so the main one will just hang waiting for this. I don't know if that is good or bad |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
| ||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.31911.196 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InstallAndCheckCorrelation", "InstallAndCheckCorrelation\InstallAndCheckCorrelation.vcxproj", "{204CD25F-AAEA-4CA1-AB9F-A26747976932}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{204CD25F-AAEA-4CA1-AB9F-A26747976932}.Debug|x64.ActiveCfg = Debug|x64 | ||
{204CD25F-AAEA-4CA1-AB9F-A26747976932}.Debug|x64.Build.0 = Debug|x64 | ||
{204CD25F-AAEA-4CA1-AB9F-A26747976932}.Debug|x86.ActiveCfg = Debug|Win32 | ||
{204CD25F-AAEA-4CA1-AB9F-A26747976932}.Debug|x86.Build.0 = Debug|Win32 | ||
{204CD25F-AAEA-4CA1-AB9F-A26747976932}.Release|x64.ActiveCfg = Release|x64 | ||
{204CD25F-AAEA-4CA1-AB9F-A26747976932}.Release|x64.Build.0 = Release|x64 | ||
{204CD25F-AAEA-4CA1-AB9F-A26747976932}.Release|x86.ActiveCfg = Release|Win32 | ||
{204CD25F-AAEA-4CA1-AB9F-A26747976932}.Release|x86.Build.0 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {77ED5C57-8A8C-4D87-9818-ABFB99B8E9D2} | ||
EndGlobalSection | ||
EndGlobal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this removal intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is being injected by VS anyway. This one was leading to debug needing the release package (as VS left this and injected the debug on as well).