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.
This commit is contained in:
Rich 2013-09-25 15:56:53 +00:00
parent d59bc3a087
commit 928c390c42
2 changed files with 6 additions and 3 deletions

View File

@ -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;

View File

@ -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();