This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Disable PCRESTORE not working
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 23, 2008
01:16 PM
Disable PCRESTORE not working
I have a long pause at the beginning of an MSI installation on Vista. The logging shows the pause due to setting a system restore point.
I have tried using the Disable ( PCRESTORE ) command to do this, and it does not work. I found a bug listed in one of the release notes for 2009 SP1, I am using InstallShield Premier 2009 SP2.
Any advice on getting the Disable ( PCRESTORE ) command working? I have tried executing the script function in numerous custom actions during the install and it does not fix it. I also call the Is function with the SYSTEM_RESTORE_ENABLED constant and after calling Disable always returns 0.
Is there a setting that I am doing wrong? I put in a message box during the script so I know that the function is getting called.
The Custom Action is set to Synchronous ( Ignores exit code), Immediate Execution & Always Execute.
Anyone have any success using this function? It is extremely frustrating, I installed the demo trial version of 2009 just to see if upgrading to it would resolve this problem but no luck yet.
I have tried using the Disable ( PCRESTORE ) command to do this, and it does not work. I found a bug listed in one of the release notes for 2009 SP1, I am using InstallShield Premier 2009 SP2.
Any advice on getting the Disable ( PCRESTORE ) command working? I have tried executing the script function in numerous custom actions during the install and it does not fix it. I also call the Is function with the SYSTEM_RESTORE_ENABLED constant and after calling Disable always returns 0.
Is there a setting that I am doing wrong? I put in a message box during the script so I know that the function is getting called.
The Custom Action is set to Synchronous ( Ignores exit code), Immediate Execution & Always Execute.
Anyone have any success using this function? It is extremely frustrating, I installed the demo trial version of 2009 just to see if upgrading to it would resolve this problem but no luck yet.
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 24, 2008
10:26 AM
To add to the mystery, I call the script function below multiple times one right after the other, the SystemRestoreIsEnableIS() returns 1 the first time, after Disable( PCRESTORE ) it returns 0, then the next time MyFunction is called it does the 1 and then 0 over again. It is as though the call to Disable(PCRESTORE) is only temporary during the function call and then the variables get reset within InstallShield.
This is incredibly frustrating.
function MyFunction(hMSI)
BOOL b;
string szMsg;
begin
b = SystemRestoreIsEnabledIS();
NumToStr( szMsg, b );
AskYesNo( szMsg, YES );
Disable( PCRESTORE );
b = SystemRestoreIsEnabledIS();
NumToStr( szMsg, b );
AskYesNo( szMsg, YES );
return ISERR_SUCCESS;
end;
This is incredibly frustrating.
function MyFunction(hMSI)
BOOL b;
string szMsg;
begin
b = SystemRestoreIsEnabledIS();
NumToStr( szMsg, b );
AskYesNo( szMsg, YES );
Disable( PCRESTORE );
b = SystemRestoreIsEnabledIS();
NumToStr( szMsg, b );
AskYesNo( szMsg, YES );
return ISERR_SUCCESS;
end;
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 24, 2008
10:42 AM
What project type are you working with? The prototype you posted suggests you are putting this in a custom action. Unfortunately (even if it worked) that's not a good semantic match for this kind of thing. If you're using an InstallScript MSI project, you should put it in an event handler rather than a custom action. If you're using a Basic MSI, you are advised to look into the LimitSystemRestoreCheckpointing policy instead.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 24, 2008
10:45 AM
It is a Basic MSI project type.
If I use an InstallScript MSI project type, which event is it best to put this in?
Thanks for the help!
If I use an InstallScript MSI project type, which event is it best to put this in?
Thanks for the help!
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)