Using Windows Environment Variables in Directory Aliases


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Jim Guerber on September 10, 2009 at 12:01:08:

Jon Sacks reported by email that if he tried to use %TMP% in a directory alias, comet would error out. I investigated that and after a long struggle with windows, found the following:

There are 2 %TMP% environment variables, one for the user where %TMP% is a compound environment variable equal to "%USERPROFILE%\Local Settings\Temp", and another for the system where %TMP% is equal to "%SystemRoot%\TEMP".

Comet uses the windows call "ExpandEnvironmentStrings(FoundPath,WorkString,_MAX_PATH);" to get the real path associated with the dir alias. Under Comet16, this results in the system version of the environment variable. Under Comet32, this results in the user version. Recall that Comet16 runs under NTVDM, and Comet32 runs as a native process. That may explain the difference.

In any case, I have found that the only reliable way to use environment variables in directory aliases for Comet16 is to specify them using the %USERPROFILE% environment variable.


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?  

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]