Подскажите, в нижеприведенном коде есть какой то глюк
На 2008-й винде при старте приложения вылазит Ошибка при запуске приложения 0xc000000f. На всех остальных виндах работает отлично. Что может быть?
читать дальше »
!include "$%WinDir%\Temp\ESETSIM\defines.txt"
!define /date date "%H:%M %d %b, %Y"
!define version "5.0.94.4"
VIAddVersionKey /LANG=1049 "ProductName" "ESET Antivirus & Firewall"
VIAddVersionKey /LANG=1049 "Comments" "Built on ${date}"
VIAddVersionKey /LANG=1049 "CompanyName" "sim team"
VIAddVersionKey /LANG=1049 "LegalCopyright" "Copyright (c) Eset 1992-2011"
VIAddVersionKey /LANG=1049 "FileDescription" "Smart Security & Antivirus"
VIAddVersionKey /LANG=1049 "FileVersion" "${version}"
VIAddVersionKey /LANG=1049 "OriginalFilename" "EsetClient.exe"
VIProductVersion "${version}"
SetCompressor /SOLID lzma
SetCompressorDictSize 32
SilentInstall silent
Name "ESET Antivirus & Smart Security"
XPStyle on
Icon install.ico
ChangeUI IDD_VERIFY progress.exe
OutFile "${Path}\EsetClient.exe"
SubCaption 3 " "
ShowInstDetails nevershow
!include FileFunc.nsh
!include x64.nsh
!insertmacro GetRoot
!insertmacro DriveSpace
!insertmacro GetOptions
!insertmacro GetParameters
var bit
var product
var setup
var silent
Function .onInit
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "EsetSIM") i .r1 ?e'
Pop $R0
StrCmp $R0 0 +2
Quit
${GetRoot} "$WINDIR" $R0
${DriveSpace} "$R0" "/D=F /S=M" $R1
IntCmp $R1 300 +3 0 +3
MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "Íà ñèñòåìíîì äèñêå äîëæíî áûòü áîëåå$\n300 ìåãàáàéò ñâîáîäíîãî ìåñòà.$\nÓñòàíîâêà àíòèâèðóñà îòìåíåíà!"
Quit
ReadEnvStr $0 OS
StrCmp $0 "Windows_NT" 0 begin
ClearErrors
UserInfo::GetAccountType
IfErrors +3
Pop $0
StrCmp $0 "Admin" begin
MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "Äëÿ óñòàíîâêè ïðîãðàììû ó ïîëüçîâàòåëÿ$\näîëæíû áûòü ïðàâà àäìèíèñòðàòîðà.$\nÓñòàíîâêà àíòèâèðóñà îòìåíåíà!"
Quit
begin:
${If} ${RunningX64}
SetRegView 64
${EndIf}
ClearErrors
ReadRegStr $0 HKLM "SOFTWARE\ESET\ESET Security\CurrentVersion\Info" "ProductName"
ReadRegStr $1 HKLM "SOFTWARE\ESET\ESET Security\CurrentVersion\Info" "ProductVersion"
ReadRegStr $2 HKLM "SOFTWARE\ESET\ESET Security\CurrentVersion\Info" "InstallDir"
ReadRegStr $3 HKLM "SOFTWARE\ESET\ESET Security\CurrentVersion\Info" "ProductCode"
IfErrors search_AV
messagebox::show MB_DEFBUTTON2|MB_TOPMOST "Óñòàíîâêà àíòèâèðóñà ESET" "0,103" " $\n Íà Âàøåì êîìïüþòåðå óæå óñòàíîâëåí $\n $0 $1 $\n $\n $\n Óäàëèòå $0. $\n Ïåðåçàãðóçèòå êîìïüþòåð è çàïóñòèòå óñòàíîâêó ñíîâà. $\n $\n " "Óäàëèòü $0" "Îòìåíà"
Pop $4
StrCmp $4 "1" +2
Quit
Exec '"$2callmsi.exe" /x $3 /qb'
Quit
search_AV:
ClearErrors
StrCpy $R0 "G DATA Software"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\AVKWCtl"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "AVAST Antivirus"
StrCpy $0 "Software\ALWIL Software\Avast\4.0"
EnumRegKey $R1 HKLM $0 0
IfErrors +4
ReadRegStr $R1 HKLM $0 Avast4ProgramFolder
IfFileExists $R1\aswRunDll.exe conflicts
DeleteRegKey HKLM $0
ClearErrors
StrCpy $1 "Software\Wow6432Node\ALWIL Software\Avast\4.0"
EnumRegKey $R2 HKLM $1 0
IfErrors +4
ReadRegStr $R1 HKLM $0 Avast4ProgramFolder
IfFileExists $R1\aswRunDll.exe conflicts
DeleteRegKey HKLM $0
ClearErrors
StrCpy $R0 "AVG Antivirus or Internet Security"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\AvgCoreSvc"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $0 "SYSTEM\CurrentControlSet\Services\avg8wd"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "Kaspersky Antivirus or Internet Security"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\AVP"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "Symantec Software"
StrCpy $0 "SOFTWARE\Symantec\InstalledApps\SRTSP"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $0 "SOFTWARE\Symantec\InstalledApps\SAVRT"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $0 "SOFTWARE\Symantec\InstalledApps\SMSVersionSupport"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "Norton Internet Security"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\ccEvtMgr"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $0 "SYSTEM\CurrentControlSet\Services\Norton Internet Security"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $0 "Software\Norton"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $0 "Software\Wow6432Node\Norton"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "Panda Software"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\PAVSRV"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "Avira Antivirus or Security Suite"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\AntiVirService"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "BitDefender Software"
StrCpy $0 "SOFTWARE\BitDefender"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "CA Software"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\CAISafe"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "F-Secure Software"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\Eventlog\System\F-Secure Gatekeeper"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "McAfee Software"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\McShield"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "Windows Live OneCare"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\OneCareMP"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "TrendMicro Software"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\SfCtlCom"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $0 "SYSTEM\CurrentControlSet\Services\tmcomm"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $0 "SYSTEM\CurrentControlSet\Services\tmtdi"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "TrustPort Antivirus or PC Security"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\avas_service"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "Norman Antivirus or Security Suite"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\nsesvc"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "Rising Antivirus"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\RsRavMon"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "Bullguard Internet Security"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\BsFileScan"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "Sunbelt VIPRE Antivirus"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\SBAMSvc"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
StrCpy $R0 "Microsoft Security Essentials"
StrCpy $0 "SYSTEM\CurrentControlSet\Services\MsMpSvc"
EnumRegKey $R1 HKLM $0 0
IfErrors 0 conflicts
ClearErrors
Goto +3
conflicts:
MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "Âíèìàíèå! Íà Âàøåì êîìïüþòåðå óæå óñòàíîâëåí $R0$\nÓäàëèòå åãî èç Ïàíåëè óïðàâëåíèÿ è çàïóñòèòå óñòàíîâêó ñíîâà"
Quit
${GetParameters} $R0
StrCpy $silent qb
${GetOptions} "$R0" "/eav" $product
IfErrors +4
StrCpy $product "eav"
StrCpy $silent qn
Goto bit
ClearErrors
${GetOptions} "$R0" "/ess" $product
IfErrors +4
StrCpy $product "ess"
StrCpy $silent qn
Goto bit
ClearErrors
ReadRegStr $0 HKLM "SOFTWARE\ESET\ESET Security\CurrentVersion\Info" "ProductName"
IfErrors run
StrCpy $1 $0 4 #
StrCmp $1 "ESET" 0 run
ReadRegStr $2 HKLM "SOFTWARE\ESET\ESET Security\CurrentVersion\Info" "ProductVersion"
MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "Íà Âàøåì êîìïüþòåðå óæå óñòàíîâëåí$\n$0 $2$\n$\nÂîçìîæíû ïðîáëåìû ïðè óñòàíîâêå ïîâåðõ ðàáîòàþùåãî ESET ! ! !$\n$\nÓäàëèòå $0.$\nÇàòåì çàïóñòèòå óñòàíîâêó ñíîâà.$\n$\nÓñòàíîâèòü ïîâåðõ ñòàðîé âåðñèè ìîæíî$\nïðè ïîìîùè êëþ÷åé ñêðûòîé óñòàíîâêè$\n/eav = NOD32 Antivirus$\n/ess = Smart Security"
Quit
run:
ClearErrors
messagebox::show MB_DEFBUTTON3|MB_TOPMOST "Óñòàíîâêà àíòèâèðóñà ESET" "0,103" "Êàêîé àíòèâèðóñíûé ïðîäóêò âû õîòèòå óñòàíîâèòü äëÿ çàùèòû ñâîåãî êîìïüþòåðà?$\n$\nNOD32 Antivirus = Àíòèâèðóñ + Àíòèøïèîí (ðåêîìåíäóåòñÿ íà÷èíàþùèì ïîëüçîâàòåëÿì)$\n$\nSmart Security = Àíòèâèðóñ + Àíòèøïèîí + Àíòèñïàì + Ïåðñîíàëüíûé ôàéåðâîë (îïûòíûì)" "NOD32 Antivirus" "Smart Security" "Îòìåíà"
Pop $product
StrCmp $product "1" 0 +3
StrCpy $product "eav"
Goto bit
StrCmp $product "2" 0 +3
StrCpy $product "ess"
Goto bit
Quit
bit:
${If} ${RunningX64}
StrCpy $bit 64
${Else}
StrCpy $bit 32
${EndIf}
FunctionEnd
Section Install
SetOutPath "$WINDIR\Temp\EsetSIM"
File cfg.xml
File /nonfatal "/oname=$WINDIR\Temp\EsetSIM\cfg.xml" "eset.xml"
StrCmp $product "eav" 0 ess
StrCmp $bit "32" 0 eav64
File /r "Distrib\eavbe_nt32_rus\*.*"
File /nonfatal "/oname=$WINDIR\Temp\EsetSIM\cfg.xml" "eav.xml"
StrCpy $setup eavbe_nt32_rus
StrCpy $9 "$PROGRAMFILES\ESET\ESET NOD32 Antivirus"
Goto install
eav64:
StrCmp $bit "64" 0 exit
File /r "Distrib\eavbe_nt64_rus\*.*"
File /nonfatal "/oname=$WINDIR\Temp\EsetSIM\cfg.xml" "eav.xml"
StrCpy $setup eavbe_nt64_rus
StrCpy $9 "$PROGRAMFILES64\ESET\ESET NOD32 Antivirus"
Goto install
ess:
StrCmp $product "ess" 0 exit
StrCmp $bit "32" 0 ess64
File /r "Distrib\essbe_nt32_rus\*.*"
File /nonfatal "/oname=$WINDIR\Temp\EsetSIM\cfg.xml" "ess.xml"
StrCpy $setup essbe_nt32_rus
StrCpy $9 "$PROGRAMFILES\ESET\ESET Smart Security"
Goto install
ess64:
StrCmp $bit "64" 0 exit
File /r "Distrib\essbe_nt64_rus\*.*"
File /nonfatal "/oname=$WINDIR\Temp\EsetSIM\cfg.xml" "ess.xml"
StrCpy $setup essbe_nt64_rus
StrCpy $9 "$PROGRAMFILES64\ESET\ESET Smart Security"
Goto install
install:
SetOutPath "$9\License"
File /nonfatal "eset.lic"
SetOutPath "$WINDIR\Temp\EsetSIM\APPDATADIR\Updfiles"
File /nonfatal "$%WinDir%\Temp\EsetSIM\Distrib\Updfiles\*.nup"
IfFileExists "$EXEDIR\eset_upd\update.ver" 0 start
StrCmp $EXEDIR "c:" start
IfFileExists "c:\eset_upd\*" 0 +2
RMDir /r /rebootok "c:\eset_upd"
CreateDirectory "c:\eset_upd"
CopyFiles /silent "$EXEDIR\eset_upd\*" "c:\eset_upd"
start:
WriteRegDWORD HKCU "Software\ESET\ESET Security\CurrentVersion\Client" "ShowSplash" 0x00000000
WriteRegDWORD HKCU "Software\ESET\ESET Security\CurrentVersion\Client" "ShowDesktopAlert" 0x00000000
WriteRegDWORD HKLM "\SOFTWARE\ESET\ESET Security\CurrentVersion\Info" "PackageFeatures" 0x00000001
ExecWait '"$SYSDIR\msiexec.exe" /i "$WINDIR\Temp\EsetSIM\$setup.msi" /$silent'
exit:
SetOutPath "$WINDIR\Temp"
RMDir /r /rebootok "$WINDIR\Temp\EsetSIM"
Quit
SectionEnd