Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Execute an exe during an install - RunOnce or a cu


3 replies to this topic

kirann_hegde

kirann_hegde
  • Full Members
  • 93 posts

Posted 12 July 2012 - 10:01

Hello,

I am now facing an issue which i believe is very commonly encountered.
I need to launch an EXE at the end of the installation. I can use a custom action of type 19 to do it.
However, i just realized that the EXE depends upon the PATH environmental variable which is updated by the installer. Since the environment variable was not available when the msiexec process started, this environment variable is not available for use to the EXE.

To overcome this, we have the following options:
i)Run the exe after a reboot by making use of RunOnce keys
The user has to reboot the sytem after an install.
By creating an entry for this EXE in RunOnce, this exe will run upon a user logon sucessfully as the environment variables would be available to it.

Question: Is using RunOnce a recommended procedure to accomplish this?

ii)Make use of a vbscript custom action to launch the EXE.

iii)Broadcast a message to windows when the environment variable is updated


What is the recommended solution here?
Is RunOnce used by msi installers frequently?

Thanks,
Kiran Hegde

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 12 July 2012 - 20:06

As far as I know, option iii) will not work.
RunOnce would work, but it's not nice to have the user reboot just for that.
You could try using the App Paths registry key, not sure if that will work if the exe is launched form your installer.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths

kirann_hegde

kirann_hegde
  • Full Members
  • 93 posts

Posted 16 July 2012 - 06:26

On another note, rebooting is mandated at the end of an install due to other reasons. So rebooting is not an issue.

BTW, is using RunOnce a recommended solution in msi based installers or are there any pitfalls associated with it?

Regards,
Kiran Hegde

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 July 2012 - 10:24

I'm not aware of any special problems with RunOnce.