0

I am getting a en error while running a installer made from Innosetup on Windows 10.It works fine on Windows 8/8.1 but on Windows 10 it gives a popup as below in a message Box with "Close Program" at the end.

Application-Name has stopped Working "problem caused the program to stop working correctly. windows will close the program and notify you if a solution is available"

However on clicking "Close Program" the installer does it job but this annoying pop up is causing problem as user has to intervene to close the box message.

Is there a way to find why the error is coming and any error code/message for this?

I debugged the code and found that this line is giving the error :

Exec('cmd.exe', ' /C My-Application.EXE /argument' + ' > logFile.txt', 
   ExpandConstant('{tmp}\'), SW_HIDE, ewWaitUntilTerminated, FW_Update_ResultCode);
Jens A. Koch
  • 39,862
  • 13
  • 113
  • 141
Raulp
  • 7,758
  • 20
  • 93
  • 155
  • http://news.jrsoftware.org/read/article.php?id=102216&group=jrsoftware.innosetup#102216 – Abstract type Jun 27 '15 at 13:01
  • 1
    Is it possible, that not Inno is causing this problem, but the exe you are trying to run? In other words: does `My-Application.EXE` run properly when executed standalone? – Jens A. Koch Jun 29 '15 at 23:17
  • yes , when I run this : /C My-Application.EXE /argument' + ' > logFile.txt' in the command prompt with or without administrator like this : My-Application.EXE /argument > logFile.txt , it works fine without error but not when I invoke it from within the inno code using Exec as above. – Raulp Jun 30 '15 at 04:19
  • 1
    Does your application run without error when run from somewhere other than its own folder? You've told Inno to set the working folder to `{tmp}` above. Additionally, your application might be trying to load libraries or other resources that do not exist on the user's machine. – Miral Jun 30 '15 at 05:40
  • @Miral thanks for the hint and id did the trick.I have fixed something in the tool which necessitate it to use an extra dll which I forget to put under ExtractTemporaryFile("dll-name") and that is the reason it was not getting copied at the tmp folder and hence causing the issue.But Still I think innosetup should have given a compiler warning or exception something like "dll-name file not found" kind of.Anyway if you put your answer in the box , I will accept it as a right answer ! Many thanks.:) – Raulp Jun 30 '15 at 10:52
  • There's not much that Inno can do about it -- it doesn't know what the dependencies of your app are, and doesn't have any way of knowing whether they're there or not. – Miral Jul 01 '15 at 22:48

1 Answers1

2

Your application might be trying to load dependent libraries or other resources that do not exist on the user's machine.

You should install these to {tmp} as well, either via [Files] entries or via ExtractTemporaryFile, depending on the timing of your Exec call.

Miral
  • 12,637
  • 4
  • 53
  • 93