Skip to content
⌘ NSIS Forum Archive

The way to check WinME SFP/SR be removed or not.

1 posts

s793016#

The way to check WinME SFP/SR be removed or not.

Sorry, my English is very very poor.

For some reason, my Installer need WinME user to remove "System File Protect (SFP)" & "System Restore (SR)" first.

So I used this code to detect this.

If there is any one not much, will stop installer immediatly.

:
:
ReadRegStr $R6 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices" "*StateMgr"
StrCmp $R6 '' 0 PleaseRemoveSFP

ReadRegStr $R6 HKLM "System\CurrentControlSet\Services\VxD\VxDMon" "LogDir"
StrCmp $R6 '' 0 PleaseRemoveSFP

ReadRegStr $R6 HKLM "System\CurrentControlSet\Services\VxD\VxDMon" "SystemFileProtection"
StrCmp $R6 'Y' PleaseRemoveSFP

ReadRegStr $R6 HKLM "System\CurrentControlSet\Services\VxD\VxDMon" "SystemFileRestore"
StrCmp $R6 'Y' PleaseRemoveSFP

ReadRegStr $R6 HKLM "System\CurrentControlSet\Services\VxD\VxDMon" "TempDir"
StrCmp $R6 '' 0 PleaseRemoveSFP

ReadRegStr $R6 HKLM "System\CurrentControlSet\Services\VxD\VxDMon" "VxdCfg"
StrCmp $R6 '' 0 PleaseRemoveSFP

ReadRegStr $R6 HKLM "System\CurrentControlSet\Services\VxD\VxDMon" "VxdDat"
StrCmp $R6 '' 0 PleaseRemoveSFP

Goto Detect_END

PleaseRemoveSFP:
Quit

Detect_END:
:
: