I know this is an extremely old question, and I would imagine you've found your solution or workaround by now, but just in case this is still an issue for you, and in case anyone comes here with the same question...
When using environment variables (as opposed to LD provisioning variables) you should be able to wrap them in a double percent signs: %%variable%%.
So your declare section would look like:
'Declare Environment variables
eAllUsersProfile = oShell.ExpandEnvironmentStrings("%%AllUsersProfile%%")
eUserProfile = oShell.ExpandEnvironmentStrings("%%UserProfile%%")
eProgramFiles = oShell.ExpandEnvironmentStrings("%%ProgramFiles%%")
eWinDir = oShell.ExpandEnvironmentStrings("%%WinDir%%")
Having said that, consider than user-based environment variables are rarely available during LANDesk tasks as they generally run under the LocalSystem account.
I was fairly convinced I found this information in the LD manual, but looking back now I can't find it, so no idea where I learnt it from!
Message was edited by: Richard Archer to add comment about user variables