Ejemplo n.º 1
0
        public override void Install(IDictionary stateSaver)
        {
            base.Install(stateSaver);

            //String applicationPath = getAppPathFromRegistry();
            if (Context.Parameters["TargetDir"] == null)
            {
                throw new Exception("Custom Data: TargetDir not set");
            }

            String applicationPath = Context.Parameters["TargetDir"].Substring(0, Context.Parameters["TargetDir"].Length - 1);

            PrinterMonitorInstaller installer = new PrinterMonitorInstaller(applicationPath);

            try
            {
                installer.InstallAll();
            }
            catch (Win32Exception ex)
            {
                throw new InstallException(ex.Message);
            }
        }