Running an executable on postinstall, but path isn't fixed

33 views
Skip to first unread message

L. E. Segovia

unread,
Nov 13, 2025, 6:40:28 AMNov 13
to inno...@googlegroups.com

Hi all,

I'm working on an installer project, and one of my Components requires:

  • find if Visual Studio is installed, and if found, make it installable
  • if selected, the Component has to call an executable from the package's install path at postinstall time.

The former is doable with Check calls (after suitable caching), but the latter seems to be only doable with CurStepChanged, is this correct? 

Would it be possible to add support for this use case to [Tasks] or [Run]?

Thanks in advance,

Amyspark

-- 
amyspark 🌸 https://www.amyspark.me

Gavin Lambert

unread,
Nov 16, 2025, 6:56:09 PM (11 days ago) Nov 16
to innosetup
On Friday, November 14, 2025 at 12:40:28 AM UTC+13 L. E. Segovia wrote:

I'm working on an installer project, and one of my Components requires:

  • find if Visual Studio is installed, and if found, make it installable
  • if selected, the Component has to call an executable from the package's install path at postinstall time.

The former is doable with Check calls (after suitable caching), but the latter seems to be only doable with CurStepChanged, is this correct? 

You can use {code:...} constants to insert a script-calculated path (if existing values like {app} are not sufficient).  When doing this you should always have that function only return a pre-calculated value (via global variable) and use a Check function as well to skip the entry if the value is invalid.  You can calculate the appropriate value in CurStepChanged(ssPostInstall) or earlier if possible.
Reply all
Reply to author
Forward
0 new messages