PDA

View Full Version : Uninstall page refresh



WallyWonka
08-18-2008, 08:12 PM
In my project I have it configured so that certain buttons will become visible\enabled when I install the program and the registry entries are present:

is_there = Registry.DoesKeyExist(HKEY_LOCAL_MACHINE, "SOFTWARE\\MyApp\\v1.0");
if is_there then
Button.SetVisible("Button1", false);
Button.SetEnabled("Button2", true);

That works great when you set the 'On Click' button properties to:

File.Run("Autoplay\\setup.exe", "", "", SW_SHOWNORMAL, true);
Page.Jump("Page1");

After a successful installation the buttons will appear with no problems at all. My problem is that I have a Uninstall button in my project and when I successfully remove the app and all it's registry entries, the page does not refresh automatically the same way it would have if I installed it. The buttons stay the way they are even though the registry entries are now gone. I have to close the autoplay application and reopen it for the buttons to display properly. This is not the case when I install it though, it will refresh automatically. I tried this:

File.Run("Autoplay\\Uninstall.exe", "", "", SW_SHOWNORMAL, true);
Page.Jump("Page1");
Page.Redraw();
Application.SetRedraw(true);

None of those work however, Hope someone can help. Thanks in advance.

holtgrewe
08-18-2008, 11:50 PM
I had difficulty understanding exactly what you are asking, but maybe this will help.
Any Scripting following a Page.jump will not normally be executed; however there is an obscure variable which allows this:

_NoExitScriptOnPageJump
If set to true, action script in an event will continue to be executed after a Page.Jump or Page.Navigate action is called. If set to false, the execution of the action script in the event will halt after a Page.Jump or Page.Navigate is called. This variable is set to false by default.

If this is way off base from what you're trying to do, just ignore this post. LOL