New feature request

87 views
Skip to first unread message

Steve Sneed

unread,
Jun 6, 2025, 5:00:34 PM6/6/25
to innosetup
I'm still on 6.3.3, so apologies if these have been addressed in 6.4.x, but I didn't see anything about them in the what's-new.

There are two script functions I'd love to see added:

SetEnv (compliment to GetEnv)
GetBinaryType (from WinApi.Windows)

I've added externals for these, but native script functions would be cleaner, and I suspect both would be widely used.

Thanks!

Steve

Bill Stewart

unread,
Jun 10, 2025, 5:09:40 PM6/10/25
to innosetup
On Friday, June 6, 2025 at 3:00:34 PM UTC-6 Steve Sneed wrote:

SetEnv (compliment to GetEnv)

I don't think we need this one, because the FAQ already tells you how to do it[1].

GetBinaryType (from WinApi.Windows)

This Windows API function has some limitations. What are you using it for?


Steve Sneed

unread,
Jun 11, 2025, 10:34:38 AM6/11/25
to innosetup
Bill - I've migrated an app, which depends on a couple of 3rd-party services (which have their own installers,) from 32 to 64 bit.  When I install the new version, I want to replace the 32-bit services with 64 bit versions.  One of the services installs itself in the same nonstandard folder and with the same filename whether 32 or 64 bit, so I want to confirm bitness on the existing service EXE before calling its installer to update to the 64-bit version.  I can write a DLL to get the bitness info from the PE header and include that in the installer, but since the system provides GetBinaryType(), it makes more sense to just use that.  Defining an external for the kernel32 function works fine; I just thought it would be a generally useful function to add for cases like mine that are migrating bitness.

On SetEnv: yes, the registry support makes it possible, but at the expense of more lines of script and greater possibility of bugs.  SetEnv() (and SetUserEnv ())  would reduce those.

Thanks!
Steve
Reply all
Reply to author
Forward
0 new messages