From 928c390c422174a666ae7d15a905517adaf54657 Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 25 Sep 2013 15:56:53 +0000 Subject: [PATCH] Change code that documents when a SQL script is run to record it as info rather than error. When a PDF is created from MSWord, PROMS checks to see if an addin is loaded for MSWord 2007. The registry key has been changed to be generically applicable to multiple operating systems. Specifically this will now work for MSWord 2007 on Windows 7. --- PROMS/DataLoader/frmLoader.cs | 2 +- PROMS/LBWordLibrary/LBObjectExtension.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/PROMS/DataLoader/frmLoader.cs b/PROMS/DataLoader/frmLoader.cs index 314cc84d..e484ea80 100644 --- a/PROMS/DataLoader/frmLoader.cs +++ b/PROMS/DataLoader/frmLoader.cs @@ -379,7 +379,7 @@ namespace DataLoader ssr.InfoMessage += new SQLScriptRunnerEvent(ssr_InfoMessage); try { - AddError("Running Script '{0}'", scriptName); + AddInfo("Running Script '{0}'", scriptName); ssr.Run(); Status = String.Format("Script '{0}' Complete", scriptName); ok = true; diff --git a/PROMS/LBWordLibrary/LBObjectExtension.cs b/PROMS/LBWordLibrary/LBObjectExtension.cs index 36419d13..c8ce76ff 100644 --- a/PROMS/LBWordLibrary/LBObjectExtension.cs +++ b/PROMS/LBWordLibrary/LBObjectExtension.cs @@ -37,8 +37,11 @@ namespace LBWordLibrary { get { - // this is for ExportAsFixedFormat MSOffice AddIn - RegistryKey key = Registry.ClassesRoot.OpenSubKey(@"Installer\Components\12B306B24E250DD428FC7016B6FB4BD8"); + // this is to determine if ExportAsFixedFormat was installed in MSOffice + // This key only worked for Vista + //RegistryKey key = Registry.ClassesRoot.OpenSubKey(@"Installer\Components\12B306B24E250DD428FC7016B6FB4BD8"); + // This key works for Windows Vista and Windows 7 + RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\0E5C161912A2A6C4C93C76678926C56C"); if (key != null) { key.Close();