If the code above didnt work(BY SOMEONE) Mayby the virus you have is not an autorun one and maybe a simple .bat virus set to restart each time you log on to your computer,if so this will be located in all C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
So any user logging on will have the virus .bat load load up with them, the .bat may run the make you restart or logoff
You still have a few options try opening the folder and looking for a .bat file and find its name
%SystemRoot%\explorer.exe "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup"
See if any .bat files exist there? if you dont see it it may have the /h attribute so in your code you will need to make them visible so you can find the name of the virus .in or .bat, if you manage to find the name of the virus then just switch the "variable name" below to whatever the virus name is...
if so try this code as above using the .bat extention instead.
@echo off
dir
if exist "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\"Variablename.bat" goto inf
:inf
attrib autorun.inf -s -h -r -a
del "variablename.bat" (change to the virus name)
msg * autorun.bat Deleted
:end
end
good luck