Page 1 of 1

NATIVE_UNINSTALL Equals REBOOT but not rebooting

Posted: Wed Sep 23, 2015 4:52 pm
by tofutim
Now that I have the uninstall triggering, I have another problem. I do not want the uninstall to reboot, but NATIVE_UNINSTALL Equals REBOOT when I use the updater. This doesn't happen when I run the new installer by itself, but when it runs it using the updater it seems to always trigger the REBOOT.

Is there a way to use the updater without NATIVE_UNINSTALL = REBOOT?
What causes this?

Re: NATIVE_UNINSTALL Equals REBOOT but not rebooting

Posted: Wed Sep 23, 2015 4:56 pm
by tofutim
I wonder if it is safe to comment out the REBOOT. Besides left over files, will it mess up something when I actually reboot?

Re: NATIVE_UNINSTALL Equals REBOOT but not rebooting

Posted: Thu Sep 24, 2015 1:51 pm
by FrancescoT
Dear Tofutim,

I am not quite sure to have a full picture of your problem, but anyway, the REBOOT condition is directly returned by the Native Installer Engine.
This can happens due several causes, as for example; files marked for deletion upon a reboot or service uninstall that may be delayed until the next reboot of the system.

You may also ignore such condition, but at the same time, it would be better to display a message-box where to choose if to apply the reboot immediately.

For what concerns the fact that the "new installer" seems to return a REBOOT condition and only when called from your updater, this effectively sounds strange.

Did you try "for test purpose", to execute your "new installer" from a different process? ... just to see if it still returns the same reboot condition.

Regards

Re: NATIVE_UNINSTALL Equals REBOOT but not rebooting

Posted: Thu Sep 24, 2015 1:58 pm
by tofutim
Looks like the problem is a DLL in use. I know that I can find the tasks stuck to it using tasklist /m but how do I get this information into my script? It seems that I am only getting the -1 at the end of the tasklist command. I would like to check and then wait a second.

Re: NATIVE_UNINSTALL Equals REBOOT but not rebooting

Posted: Thu Sep 24, 2015 2:16 pm
by FrancescoT
Dear Tofutim,

a safer way to check if a file is open/used, it's to try to open it.
Unfortunately, you should create a small application or a dll to execute a WINAPI as "fopen".

Regards