Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Error in buliding installer?

Error in buliding installer?

Scheduled Pinned Locked Moved C#
workspacedatabasewindows-adminhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Ibuprofen
    wrote on last edited by
    #1

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Configuration.Install; using Microsoft.Win32; using System.Reflection; using System.IO; using System.Diagnostics; using System.Windows.Forms; namespace WindowsControlLibrary1 { [RunInstaller(true)] public partial class CustomInstaller : Installer { public CustomInstaller() { InitializeComponent(); } protected override void OnAfterInstall(System.Collections.IDictionary savedState) { string programName = "\"" + CeAppMgrExe + "\""; string programArg = "\"" + IniFilePath + "\""; MessageBox.Show(programName + " " + programArg); Process.Start(programName, programArg); base.OnAfterInstall(savedState); } const string _ceAppMgRegistryPath = @"software\Microsoft\Windows\CurrentVersion\App Paths\CEAppMgr.exe"; const string _iniFileName = "PDARAM.ini"; const string _filePrefix = @"file:\"; string CeAppMgrExe { get { RegistryKey subKey = null; string exePath = null; try { subKey = Registry.LocalMachine.OpenSubKey(_ceAppMgRegistryPath); exePath = (string) subKey.GetValue(""); } finally { if (subKey != null) subKey.Close(); } return exePath; } } string IniFilePath { get { string installFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); string iniFilePath = Path.Combine(installFolder, _iniFileName); if (iniFilePath.StartsWith(_filePrefix)) { int index = _filePrefix.Length; iniFilePath = iniFilePath.Substring(index); } return iniFilePath; } } } } Can anyonehelp me? I am buliding the Desktop installer, and it starts the install proccess, but tells me there is an error in my setup file? <b>This is my INI file</b> [CEAppManager] Version = 1.0 Componet = DeviceApplication1 [DeviceApplication1] Description =

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups