Jump to content

%programfiles% Environment Variable


Recommended Posts

I'm having a spot of trouble with the %programfiles% variable.

I'm trying to use it to update the virus definitions after Symantec Antivirus 10 Installs, during RunOnceEx

"%programfiles%\Symantec AntiVirus\VPDN_LU.exe /S" /f

However, the problem seems to be that when it comes to executing this, Windows has trouble with the space in 'Program Files' (which is obviously where %programfiles% resolves to) I'm sure I'm doing something wrong, like missing a quote or something but quite frankly I'm stumped, and I'd appreciate it if someone else could point me in the right direction :)

TIA,

// Xeijin

Edited by Xeijin
Link to comment
Share on other sites


firstly did you try %ProgramFiles% as this is the environment variable in winxp.

go run->cmd

type

set

This will show the environment variable currently defined

Secondly what kind of error are you getting? (it might be helpful to know what we are trying to solve)

Edited by phkninja
Link to comment
Share on other sites

You either need to add quotes around the command line to use the variable, or you need to substitute the 8.3 path instead of the variable for the command to work. I see you've got it in runonceex format, so it should probably look like this:

"\"%programfiles%\Symantec AntiVirus\VPDN_LU.exe\" /S" /f

Link to comment
Share on other sites

Hi phkninja,

Sorry I should have explained it better:

The error is a critical one, and is basically saying that it can't find "C:\Program " which I'm assuming is because of something to do with the space in between 'Program Files'.

// Xeijin

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...