user2423434
user2423434

Reputation: 199

Installshield) how to prevent uninstalling when the program is running

I'm using InstallShield 2019 Professional Edition and have a Basic MSI Project which includes some executable program.

In Basic MSI Project, I want to know how to prevent uninstalling program when the program is running. Is there any option or install-script to achieve it?

Upvotes: 0

Views: 268

Answers (1)

Christopher Painter
Christopher Painter

Reputation: 55571

Ideally your application should create a Mutex when it starts and release it when it shut's down. Then you can write a custom action in the installer that looks for this mutex and blocks the uninstall if the mutex is present.

But honestly most people don't do this. They just use the built-in behavior of FilesInUse.

Upvotes: 1

Related Questions