c# - How to run InstallScript project from console application -


i have created major upgrade (installscript msi) running when executing clicking on exe file.

i creating console aplication runs same exe time after installation, along new version, previous version showing in add/remove programs list.

all components installing correctly but

why previous version showing when run exe console application?

// enter executable run, including complete path start.filename = @"folder1\myisproj.exe"; // want show console window? start.createnowindow = true; start.windowstyle = processwindowstyle.minimized;  start.useshellexecute = false; start.redirectstandardoutput = true;  // run external process & wait finish using (process proc = process.start(start)) {    //proc.waitforexit();     proc.close(); } 

one more thing have observed is, when call exe console application installer open , after accepting eula , etc, when actual installation start console application getting called again. stop behavior have added check in main method run console application once. when installer try run console applicaiton again check whether process running, if yes returns console application.

process[] result = process.getprocesses();  foreach (var item in result) {     if (item.processname.contains("myisproj"))     {          console.writeline("there instance running.");         system.environment.exit(0);         return;     }  } 

but after doing add/remove program list shows 2 entries. have solve issue? stuck issue.

i using installshield 2011 professional edition create exe.

there 2 problems here. first don't have valid major upgrade evidenced 2 entries in add/remove programs. you've changed productcode upgrade table entry (as executed findrelatedproducts , removeexistingproducts) isn't detecting previous installation , removing part of upgrade. there number of causes of can found googling.

the second installscript msi silent installations royal pain in backside. require generate response file , run it. brittle , big reason why suggest staying basic msi simpler story support. ( msiexec /i foo.msi /qn reboot=r , check 3010 exit code indicating reboot needed , suppressed. )


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -