Could not find InstallState

I add a custom action to the Commit node of Setup project.
The custom action is a .dll.
But when I execute the install project, it result in an error message at the
end of installation:
Could not find files 'C:\WinProg\CutomAction.InstallState'

Where c:\WinProg is the target folder.

How can I do





Answer this question

Could not find InstallState

  • Rachel Falzone - MSFT

    I think that in your install method, you need to use the "statesaver" object and save the output.

  • Dimitar Birov - MSFT

    When i set the "InstallerClass" property to false, then rebuild, it gave me this error

    Error 1 Unspecified module entry point for custom action '....\customaction.dll'. ...


  • natasha23

    In case if some one is still looking for the answer to this let me post what I found out. I was also getting the error "Could not find file xyz.installstate".

    To avoid this problem try to attach the same custom action to "Install" that you have attached to "commit". Unfortunately I do not know why that works but when I carefully looked at the walkthroughs it looks like that is what is suggested to be done.

    Once I attached the same custom action to "Install" that I had done to "Commit" my problem was solved.

    Hope this helps.

    --Aalok.


  • JHibbins

    David Guyer MS wrote:

    Did you make the call to MyBase.Install(stateSaver)

    Have you hooked up the Install custom action to the Install node in the custom actions editor

    Yes, I have done the two steps you mentioned above.


  • DeadlySpider

    Did you make the call to MyBase.Install(stateSaver)

    Have you hooked up the Install custom action to the Install node in the custom actions editor



  • Ollatek

    All you need to do, set the "InstallerClass" property of your custom application to false.



  • knallbunt

    Were you able to fix this problem I am facing the same thing and need help

  • cam_church

    Have you also added the custom action (project output) to the Commit, Rollback, and Uninstall nodes

    If you have, please describe or paste your custom action code... we'll see what it looks like.



  • Michael Andy Poulsen

    You need InstallerClass true if it really is a Installer class call, not a vbscript or C++ Dll call (which is why you get that error message trying to locate an entry point).

    So assuming you have an Installer class custom action call, your missing installstate file is probably because you have a missing custom action. The installstate file holds state from install to commit, so I believe the install custom action creates it. If you haven't got an install custom action that's probably the issue. You don't need to write code, just let the base Install method get called. I think you might also see this in situations where the user isn't privileged and doesn't have access to the directory containing the file.



  • James Rosenvall

    Thanks,

    I have read the article, but I still can't figure out how to use the "statesaver" object and save the output.


  • Judas

    Thank,

    I am a hand about setup project.

    Could you give me an example

    David Guyer MS wrote:
    I think that in your install method, you need to use the "statesaver" object and save the output.


  • Hyperion_20

    Not Yet
  • simmonsj_98

    Check this

    http://dotnetjunkies.com/WebLog/saarc/comments/23340.aspx

    I had the same problem (Custom Action in Commit) and it helped.

    Google rulez =)



  • MP2006

  • Could not find InstallState