From 8a7606a7c38e07373a45e830dae9880dad79f814 Mon Sep 17 00:00:00 2001 From: S T Chan Date: Mon, 30 Dec 2013 14:39:33 -0500 Subject: [PATCH] custom action changes --- PdfScribeInstallCustomAction/CustomAction.cs | 23 +++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/PdfScribeInstallCustomAction/CustomAction.cs b/PdfScribeInstallCustomAction/CustomAction.cs index 35657fe..3fd3413 100644 --- a/PdfScribeInstallCustomAction/CustomAction.cs +++ b/PdfScribeInstallCustomAction/CustomAction.cs @@ -4,16 +4,29 @@ using System.Linq; using System.Text; using Microsoft.Deployment.WindowsInstaller; +using PdfScribeCore; + namespace PdfScribeInstallCustomAction { public class CustomActions { - [CustomAction] - public static ActionResult CustomAction1(Session session) - { - session.Log("Begin CustomAction1"); - return ActionResult.Success; + [CustomAction] + public static ActionResult CheckIfPrinterNotInstalled(Session session) + { + ActionResult resultCode; + + PdfScribeInstaller installer = new PdfScribeInstaller(); + if (installer.IsPdfScribePrinterInstalled()) + { + resultCode = ActionResult.Success; + } + else + { + resultCode = ActionResult.Failure; + } + + return resultCode; } } }