public void PerformanceCategory_InstallFailure() { string sourceFile = Path.Combine(PerformanceCategoryTests.TestDataDirectory, @"product_fail.wxs"); string msiFile = Builder.BuildPackage(sourceFile, "test.msi", "WixUtilExtension"); MSIExec.InstallProduct(msiFile, MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); string registryKey = @"system\currentcontrolset\services\InstrumentationDemo"; // Verify that the file was not created Assert.IsFalse(RegistryVerifier.RegistryKeyExists(RegistryHive.LocalMachine, registryKey), "Registry Key '{0}' was not removed on Rollback.", registryKey); }
public void PerfCounterManifest_InstallFailure() { string sourceFile = Path.Combine(PerfCounterManifestTests.TestDataDirectory, @"product_fail.wxs"); string msiFile = Builder.BuildPackage(sourceFile, "test.msi", "WixUtilExtension"); MSIExec.InstallProduct(msiFile, MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); string keyName = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{42aaeb49-78e7-4d78-81a0-6f35bfde65bc}"; // Verify that the file was removed Assert.IsFalse(RegistryVerifier.RegistryKeyExists(RegistryHive.LocalMachine, keyName), "Registry Key '{0}' was not removed on uninstall.", keyName); }
public void EventManifest_InstallFailure() { string sourceFile = Path.Combine(EventManifestTests.TestDataDirectory, @"product_fail.wxs"); string msiFile = Builder.BuildPackage(sourceFile, "test.msi", "WixUtilExtension"); MSIExec.InstallProduct(msiFile, MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); string registryKey = @"Software\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{1db28f2e-8f80-4027-8c5a-a11f7f10f62d}"; // Verify that the file was not created Assert.False(RegistryVerifier.RegistryKeyExists(RegistryHive.LocalMachine, registryKey), String.Format("Registry Key '{0}' was not removed on Rollback.", registryKey)); }
public void PerfCounter_InstallFailure() { string sourceFile = Path.Combine(PerfCounterTests.TestDataDirectory, @"product_fail.wxs"); string msiFile = Builder.BuildPackage(Environment.CurrentDirectory, sourceFile, "test.msi", "-ext WixUtilExtension -sw5153 ", "-ext WixUtilExtension"); // suppress the depricated warrning message MSIExec.InstallProduct(msiFile, MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE); string registryKey = @"system\currentcontrolset\services\InstrumentationDemo"; // Verify that the key was not created Assert.False(RegistryVerifier.RegistryKeyExists(RegistryHive.LocalMachine, registryKey), String.Format("Registry Key '{0}' was not removed on Rollback.", registryKey)); }
public void PerformanceCategory_Install_64bit() { string sourceFile = Path.Combine(PerformanceCategoryTests.TestDataDirectory, @"product_64.wxs"); string msiFile = Builder.BuildPackage(sourceFile, "test.msi", "WixUtilExtension"); MSIExec.InstallProduct(msiFile, MSIExec.MSIExecReturnCode.SUCCESS); string registryKey = @"system\currentcontrolset\services\InstrumentationDemo"; Assert.True(RegistryVerifier.RegistryKeyExists(RegistryHive.LocalMachine, registryKey), String.Format("Registry Key '{0}' was not created on install.", registryKey)); MSIExec.UninstallProduct(msiFile, MSIExec.MSIExecReturnCode.SUCCESS); // Verify that the file was removed Assert.False(RegistryVerifier.RegistryKeyExists(RegistryHive.LocalMachine, registryKey), String.Format("Registry Key '{0}' was not removed on uninstall.", registryKey)); }
public void EventManifest_Install() { string sourceFile = Path.Combine(EventManifestTests.TestDataDirectory, @"product.wxs"); string msiFile = Builder.BuildPackage(sourceFile, "test.msi", "WixUtilExtension"); MSIExec.InstallProduct(msiFile, MSIExec.MSIExecReturnCode.SUCCESS); string registryKey = @"Software\Microsoft\Windows\CurrentVersion\WINEVT\Publishers\{1db28f2e-8f80-4027-8c5a-a11f7f10f62d}"; Assert.IsTrue(RegistryVerifier.RegistryKeyExists(RegistryHive.LocalMachine, registryKey), "Registry Key '{0}' was not created on install.", registryKey); MSIExec.UninstallProduct(msiFile, MSIExec.MSIExecReturnCode.SUCCESS); // Verify that the key was removed Assert.IsFalse(RegistryVerifier.RegistryKeyExists(RegistryHive.LocalMachine, registryKey), "Registry Key '{0}' was not removed on uninstall.", registryKey); }
public void PerfCounterManifest_Install() { string sourceFile = Path.Combine(PerfCounterManifestTests.TestDataDirectory, @"product.wxs"); string msiFile = Builder.BuildPackage(sourceFile, "test.msi", "WixUtilExtension"); MSIExec.InstallProduct(msiFile, MSIExec.MSIExecReturnCode.SUCCESS); string keyName = @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{42aaeb49-78e7-4d78-81a0-6f35bfde65bc}"; string valueName = "ProviderName"; string expectedValue = "ApServerPerfmon"; RegistryVerifier.VerifyRegistryKeyValue(RegistryHive.LocalMachine, keyName, valueName, expectedValue); MSIExec.UninstallProduct(msiFile, MSIExec.MSIExecReturnCode.SUCCESS); // Verify that the file was removed Assert.IsFalse(RegistryVerifier.RegistryKeyExists(RegistryHive.LocalMachine, keyName), "Registry Key '{0}' was not removed on uninstall.", keyName); }