Hello to all people,Iīm from Spain and I think that I have encountered the solution for all people having problems whit Avira services.Sorry for my English,perhaps my explanation was very dificult to explain for me and understand for you.
I have encountered a few mistakes(I think) in the avp.inf installer for AVIRA ANTIVIR PE Free v8,both,Red and Ewieldra plugin(itīs the same for the two plugin).
First of all.I donīt use this plugins in a Bart PE envirotment.The test and correction was made in a portable mode of Avira antivirus 8.
There are only one services that start and function correctly "Avira Snapshot Driver" (ssmdrv.sys)Why?The solution at the end.
At first time,the format of the avp.inf installer for PE isnīt compatible whit the standard from Microsoft Windows Driver Development kit(canīt be installed whit the righ-click "Install" option or whit "rundll32.exe setupapi.dll,InstallHinfSection" command),and I had to create one for this test.I use Total Uninstall to capture the registry changes and file creates in the process.The result is a reg file whit the same entrys that yours avp.inf file(I convert the reg file to a inf file whit Reg2Inf utility).
To explain more Iīm going to post a small section of the reg file that correspond to AntiVirScheduler Service(sched.exe)
CODE
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_ANTIVIRSCHEDULER]
"NextInstance"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_ANTIVIRSCHEDULER\0000]
"Class"="LegacyDriver"
"ClassGUID"="{8ECC055D-047F-11D1-A537-0000F8753ED1}"
"ConfigFlags"=dword:00000000
"DeviceDesc"="Avira AntiVir Personal Free Antivirus Scheduler"
"Legacy"=dword:00000001
"Service"="AntiVirScheduler"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_ANTIVIRSCHEDULER\0000\Control]
"*NewlyCreated*"=dword:00000000
"ActiveService"="AntiVirScheduler"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AntiVirScheduler]
"Type"=dword:00000110
"Start"=dword:00000003
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):22,00,43,00,3a,00,5c,00,50,00,52,00,4f,00,47,00,52,00,41,00,\
4d,00,41,00,53,00,5c,00,41,00,76,00,69,00,72,00,61,00,5c,00,41,00,6e,00,74,\
00,69,00,56,00,69,00,72,00,20,00,50,00,65,00,72,00,73,00,6f,00,6e,00,61,00,\
6c,00,45,00,64,00,69,00,74,00,69,00,6f,00,6e,00,20,00,43,00,6c,00,61,00,73,\
00,73,00,69,00,63,00,5c,00,73,00,63,00,68,00,65,00,64,00,2e,00,65,00,78,00,\
65,00,22,00,00,00
"DisplayName"="Avira AntiVir Personal Free Antivirus Scheduler"
"Group"="NetworkProvider"
"ObjectName"="LocalSystem"
"Description"="Service to schedule Avira AntiVir Personal Free Antivirus jobs and updates."
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AntiVirScheduler\Security]
"Security"=hex:01,00,14,80,90,00,00,00,9c,00,00,00,14,00,00,00,30,00,00,00,02,\
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
00,00,02,00,60,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,\
00,18,00,fd,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,00,00,01,01,\
00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AntiVirScheduler\Enum]
"0"="Root\\LEGACY_ANTIVIRSCHEDULER\\0000"
"Count"=dword:00000001
"NextInstance"=dword:00000001
As you can view,the code is the same only whit one important diference(the other is the path to my install Dir "C:\PROGRAMAS\Avira\AntiVir PersonalEdition Classic\" in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AntiVirScheduler "ImagePath")
and yes,the hexadecimal values,but this isnīt important now
-Why you use the key HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001 and not the correct
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet where all drivers and services are installed by default in all Microsoft Operative System(2000,XP...)?
-The 2š important question.The registry keys under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root canīt be
edited manually through Regedit or whit an reg or inf file.This key are created automatically when the related services are launched the first time.This key canīt be edited,deleted,modified manually.I have encountered that reading the Documentation Microsoft Windows Driver Development kit in MSDN site.
-3š and most important.Why the service donīt start?,in this case AntiVirScheduler Service(sched.exe).I īll made many changes,(format of the path,changing the Type service..nothing)but using the program DRVLOAD.EXE and installing and uninstall the service the AntiVirScheduler funtion.I compare the registry key changes made whit DRVLOAD.EXE and my captured reg file and !!!!TACHAN!!!!.The problem is the key "Enum" under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AntiVirScheduler.This key MUST HAVE TO BE CREATED WHEN THE SERVICES START FOR THE FIRST TIME.This key canīt be be aded whit a reg or inf file.
This is the problem whit programs to capture changes in the system.Only present the final result,and whit drivers and services this is a problem.The Microsoft documentation said that when a driver or services is installed,only create the key services name,not subkeys "Enum"(the subkey "Security" can be in the inf or reg if neded).This is the proces:
Start services------Create "Enum" key under services name---Create key "LEGACY_servicename" under CurrentControlSet\Enum\Root.That īs.
This is the final reg file for this example
CODE
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AntiVirScheduler]
"Type"=dword:00000110
"Start"=dword:00000003
"ErrorControl"=dword:00000001
"ImagePath"=hex(2):22,00,43,00,3a,00,5c,00,50,00,52,00,4f,00,47,00,52,00,41,00,\
4d,00,41,00,53,00,5c,00,41,00,76,00,69,00,72,00,61,00,5c,00,41,00,6e,00,74,\
00,69,00,56,00,69,00,72,00,20,00,50,00,65,00,72,00,73,00,6f,00,6e,00,61,00,\
6c,00,45,00,64,00,69,00,74,00,69,00,6f,00,6e,00,20,00,43,00,6c,00,61,00,73,\
00,73,00,69,00,63,00,5c,00,73,00,63,00,68,00,65,00,64,00,2e,00,65,00,78,00,\
65,00,22,00,00,00
"DisplayName"="Avira AntiVir Personal Free Antivirus Scheduler"
"Group"="NetworkProvider"
"ObjectName"="LocalSystem"
"Description"="Service to schedule Avira AntiVir Personal Free Antivirus jobs and updates."
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AntiVirScheduler\Security]
"Security"=hex:01,00,14,80,90,00,00,00,9c,00,00,00,14,00,00,00,30,00,00,00,02,\
00,1c,00,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,\
00,00,02,00,60,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,\
05,12,00,00,00,00,00,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,\
20,02,00,00,00,00,14,00,8d,01,02,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,\
00,18,00,fd,01,02,00,01,02,00,00,00,00,00,05,20,00,00,00,23,02,00,00,01,01,\
00,00,00,00,00,05,12,00,00,00,01,01,00,00,00,00,00,05,12,00,00,00
and this is the inf file
CODE
[Version]
Signature="$Windows NT$"
[DefaultInstall]
AddReg =REGEntries.AddReg
[REGEntries.AddReg]
; Reg2Inf v0.46 - http://tinyurl.com/fgqyf
HKLM,"SYSTEM\CurrentControlSet\Services\AntiVirScheduler","Type",0x10001,10,01,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\AntiVirScheduler","Start",0x10001,03,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\AntiVirScheduler","ErrorControl",0x10001,01,00,00,00
HKLM,"SYSTEM\CurrentControlSet\Services\AntiVirScheduler","ImagePath",0x20000,"""C:\PROGRAMAS\Avira\AntiVir PersonalEdition Classic\sched.exe"""
HKLM,"SYSTEM\CurrentControlSet\Services\AntiVirScheduler","DisplayName",0x0,"Avira AntiVir Personal Free Antivirus Scheduler"
HKLM,"SYSTEM\CurrentControlSet\Services\AntiVirScheduler","Group",0x0,"NetworkProvider"
HKLM,"SYSTEM\CurrentControlSet\Services\AntiVirScheduler","ObjectName",0x0,"LocalSystem"
HKLM,"SYSTEM\CurrentControlSet\Services\AntiVirScheduler","Description",0x0,"Service to schedule Avira AntiVir Personal Free Antivirus jobs and updates."
HKLM,"SYSTEM\CurrentControlSet\Services\AntiVirScheduler\Security","Security",0x1,01,00,14,80,90,00,00,00,9c,00,00,00,14,00,00,00,30,00,00,00,02,00,1c,00
,01,00,00,00,02,80,14,00,ff,01,0f,00,01,01,00,00,00,00,00,01,00,00,00,00,02,00,6
0
,00,04,00,00,00,00,00,14,00,fd,01,02,00,01,01,00,00,00,00,00,05,12,00,00,00,00,0
0
,18,00,ff,01,0f,00,01,02,00,00,00,00,00,05,20,00,00,00,20,02,00,00,00,00,14,00,8
d
,01,02,00,01,01,00,00,00,00,00,05,0b,00,00,00,00,00,18,00,fd,01,02,00,01,02,00,0
0
,00,00,00,05,20,00,00,00,23,02,00,00,01,01,00,00,00,00,00,05,12,00,00,00,01,01,0
0
,00,00,00,00,05,12,00,00,00
PD:The format of this inf file isnīt correct to use whit Bart PE(I think).You have to delete all entrys in key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root]in your avp.inf file related to this 6 files:
LEGACY_ANTIVIRSCHEDULER,LEGACY_ANTIVIRSERVICE,LEGACY_AVGIO,LEGACY_AVGNTFLT,LEGAC
Y_AVIPBB,and delete
all "Enum" keys for every services in key [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServicesName],you know
AntiVirScheduler,AntiVirService,avgio,avgntflt,avipbb.
And ssmdrv?No,this is OK,Why?.Read the last line of your avp.inf file.Can you view it?THERE IS NOT "Enum" key under \Services\ssmdrv!!!!.The solution was here all time!.
I corrected my inf file and all Avira components function O.K.I have encountered other few corrections that Iīll post later.This is very long.And sorry for my English.
NEW VERY IMPORTANT!!!!!
My test and this post was made in your 0.5 version,but I downloaded the new 0.8 and I encountered a few important errors!.
The "ImagePath" value in ALL ControlSet?\Services\ServicesName MUST BE IN THIS FORMAT if the service is a SYS file(driver):
"\??\ABSOLUTE PATH TO THE DRIVER",otherwise your path donīt function.
You can test it whit DRVLOAD.EXE,use a SYS driver,what you want(but not in System32\drivers dir) and install as a services.Go to registry and search
for the services that you created,and read the value of "ImagePath".
If the services is an EXE file you can use this format in the value:
"""ABSOLUTE PATH TO THE EXE"""