Avast WEBforum

Consumer Products => Avast Free Antivirus / Premium Security (legacy Pro Antivirus, Internet Security, Premier) => Topic started by: Ubik on January 21, 2005, 12:47:03 PM

Title: A false assumption? There is no drive C!
Post by: Ubik on January 21, 2005, 12:47:03 PM
I have been trying to figure out what is wrong with Avast auto-update. On my own computer Avast works just fine, but on this one the auto-update does not work. It just shows the red "error updating virus recognition database" -message. The actual error message claims that file was not found - unfortunately it does not tell which file. I have been trying to find answers, but none of them has been relevant. There is no firewall problems and so on.

Actually, I think that I found the cause. As the topic says, there is no drive C: on this computer. Windows is installed on G: and the other drive letters are H and I and so on. I finally thought that i should try to figure out the missing file and ended up in the program file folder of avast. Setup subfolder to be exact. There is the setup.txt, which seem to be a log file.

This is the end part of the file:

11:13:21 min/pkg  ERROR:GetInetFile, CreateFile( "C:\TEMP\_av_proI.tm~a01376\dld1.tmp") returned 0x00000002
11:13:21 nrm/gen  InvalidateCurrent: invalidated server 'Download6 AVAST server' from 'main'
11:13:21 min/gen  SelectCurrent: unable to find any suitable server in 'main'
11:13:21 dbg/int  while trying to get file 'servers.def', error 0x00000002 has occured, try 15
11:13:21 min/int  tried 15 servers to get file 'servers.def', but failed (0x00000002)
11:13:21 min/fil  GetNewerStampedFile:GetFileWithRetry failed: C:\TEMP\_av_proI.tm~a01376\onefile, servers.def, error: 0x00000002
11:13:21 min/pkg  Tried to download servers.def but failed with error 0x00000002.
11:13:21 min/gen  Err:Määritettyä tiedostoa ei löydy. <-- This translates roughly to "File not found"
11:13:21 nrm/pkg  Transferred files: 0
11:13:21 nrm/pkg  Transferred bytes: 0
11:13:21 nrm/pkg  Transfer time: 0 ms
11:13:21 vrb/fil  NeedReboot=false
11:13:21 min/gen  Return code: 0x00000002 [Määritettyä tiedostoa ei löydy.]
11:13:21 min/gen  Stopped: 21.01.2005, 11:13:21

As you can see, Avast tries to create a file to C:\TEMP!

Now the question is that is it possible to correct this with some ini file editing (I did not find any references to C: or C:\TEMP from the ini files), or is it necessary to wait for a update? I hope that there is going to be an update if there is no other way to fix it!
Title: Re: A false assumption? There is no drive C!
Post by: igor on January 21, 2005, 12:54:05 PM
Do you have the TMP and TEMP environment variables set correctly?
Title: Re: A false assumption? There is no drive C!
Post by: Ubik on January 21, 2005, 01:01:40 PM
Oh, I totally forgot:

The e-mail scanner is stopped, because when it is on, it is impossible to send e-mail. Outlook Express shows an error when sending and says nothing when trying to receive e-mail. The messages are scanned by ISP, so this is not that bad problem, but maybe these two are related...

OS is Windows XP Home with SP2 and the free firewall from Kerio. Avast is the home edition 4.5.561  currently with 0503-1 virus database - manual updating seems to work, at least there is no error messages with it.

And yes, the temp variables are OK.
Title: Re: A false assumption? There is no drive C!
Post by: igor on January 21, 2005, 02:10:23 PM
Strange... what exactly are the TMP and TEMP variables set to? (both for the user and for the system)
Thanks!

Title: Re: A false assumption? There is no drive C!
Post by: Ubik on January 21, 2005, 04:49:35 PM
For system both TEMP and TMP are G:\WINDOWS\TEMP. For user they both are G:\Documents and Settings\username\Local settings\Temp.

It almost feels that there is a hard-coded folder name somewhere in the code.  ;)
Title: Re: A false assumption? There is no drive C!
Post by: igor on January 21, 2005, 05:28:54 PM
Well, I think it is hardcoded somewhere - but used only in case when all other methods (TEMP, TMP) fail. Strange... I'll check it.

Thinking of it... maybe something like that was fixed recently. What is the version you have installed right now?
Title: Re: A false assumption? There is no drive C!
Post by: Ubik on January 21, 2005, 06:10:23 PM
It is home edition 4.5.561 with 0503-1 virus database.

I tested virus database updating on the my own computer, with C:\Documents and Settings\username\Local settings\Temp open the same time. The temporary files appeared there. But then, this computer has the "standard" C: drive with windows also there.

I could try to assign the letter C to some secondary drive tomorrow on the other machine, to see if it "fixes" the problem.
Title: Re: A false assumption? There is no drive C!
Post by: Ubik on January 24, 2005, 09:13:49 AM
Sorry to bring this old topic up...

One partition is now C:, and there has been no problems anymore. Even the e-mail scanning works now! Now i am waiting for a virus database update to be 100 % sure that it was the missing C: that caused the problems - i am not reinstalling, if the first update does not use the regular auto-update mechanics (compare to the manual updating, which works).

Is there others who do not have C: drive? It might help to find out if this problem is actually caused by Avast.
Title: Re: A false assumption? There is no drive C!
Post by: Vlk on January 24, 2005, 09:38:51 AM
My guess is that the system TEMP folder (I mean the TEMP folder that is queried from a system service) is set incorrectly.
You may try to deep-search your registry for the string C:\Temp to see if it finds something...

Thanks
Vlk
Title: Re: A false assumption? There is no drive C!
Post by: Ubik on January 24, 2005, 11:23:54 AM
There was no C:\TEMP. I searched for C:\ and TEMP separately too, but found nothing suspicious. There were some entries like %SYSTEMROOT%\TEMP, but the really scientific method, a batch file with cd %SYSTEMROOT%, just gave G:\WINDOWS. The C:\ entries seemed to be there only to keep up list of drives.

Even with "Avast" I found nothing related to C:\TEMP.

I am now actually thinking that I could make a little program that gets the temp folder using the GetTempPath(). It would be interesting to see if it returns wrong location.
Title: Re: A false assumption? There is no drive C!
Post by: pk on January 24, 2005, 11:53:37 AM
http://www.geocities.com/yeohhs/gettemppath.zip

Execute CMD, write SET - what interesting paths will you get ?
Title: Re: A false assumption? There is no drive C!
Post by: Ubik on January 24, 2005, 02:17:46 PM
Thanks pk! I did not know about set, and thanks for the program, too!

The program and set both give G:\DOCUME~1\username\LOCALS~1\Temp as temp (and tmp). Username is completely "legal" (no characters outside a-z in any username), so i doubt it is the reason. Homedrive, systemdrive, systemroot and all the other locations contain G:.
Title: Re: A false assumption? There is no drive C!
Post by: pk on January 24, 2005, 04:51:47 PM
I made a little tool: it'll read your TMP/TEMP system variables... try it... (http://cs.felk.cvut.cz/~kurtip1/getvar.exe (http://cs.felk.cvut.cz/~kurtip1/getvar.exe))
In setup, if TMP or TEMP variables are not found, "C:\TEMP" path is used.
Title: Re: A false assumption? There is no drive C!
Post by: igor on January 24, 2005, 04:54:53 PM
How about a trailing backslash in the paths?
Title: Re: A false assumption? There is no drive C!
Post by: Ubik on January 25, 2005, 05:23:06 PM
pk:

http://cult.tpu.fi/student/a2irauta/info.gif

It looks ok, but...

igor:

...I still need to test the backslashes. The automatic updating worked today, when there was drive C. On my own computer there is no backslashes in the end and it works.
Title: Re: A false assumption? There is no drive C!
Post by: Ubik on January 26, 2005, 10:07:38 AM
Backslash in the end helped! Well, at least the mail protection works correctly now - I assume that the problem with mail protection is the same could-not-create-temporary-file. Now i am only wondering why the backslash was missing in the first place...

Well, thank you for helping me!
Title: Re: A false assumption? There is no drive C!
Post by: igor on January 26, 2005, 10:20:49 AM
Oh, that's not exactly what I meant... I was rather trying to say that it shouldn't be there.
So, you are saying that with a backslash at the end it works, and without it it doesn't work?

What is the exact content of the TMP and TEMP variables? I mean - the content you see when you select the variables in the "System Properties" and click on Edit, not the expanded ones (both system and user, if possible).
Thanks!\
Title: Re: A false assumption? There is no drive C!
Post by: Ubik on January 26, 2005, 12:18:21 PM
I was hasty. The mail scanner actually works now without the backslashes in the end too! I do not think that I can  say anything about the updating anymore - I would not be surprised if it somehow worked now. I will try rebooting, just in case the path gets stored once it is read in. (I mean, that if Avast/a module reads it in only once, and then uses it even if the actual path was changed - maybe I should try something wild as the path to see if it is read only once.)

Here are the temp variables copy-pasted from the Edit window:

TEMP (user): %USERPROFILE%\Local Settings\Temp
TMP (user): %USERPROFILE%\Local Settings\Temp

TEMP (system): %SystemRoot%\TEMP
TMP (system): %SystemRoot%\TEMP
Title: Re: A false assumption? There is no drive C!
Post by: Ubik on January 26, 2005, 01:35:09 PM
The mail scanner still works, after changing the paths to nonbackslashed version and rebooting.