%COMMYDOCDIR% empty on Windows Server 2003

Hello,

On Windows Server 2003 R2 SP2 x86 Standard Edition (I didn’t check for other variants), the %COMMYDOCDIR% global variable value is an empty string. The %COMAPPDATADIR% and %MYDOCDIR% global variables have correct values on the same OS.

The expected default value is “C:\Documents and Settings\All Users\Documents”.

On Windows XP SP3 x86 and Windows 7 SP1 x64, the %COMMYDOCDIR% global variable has the correct value.

I am using Paquet Builder 3.1.0 (latest version so far).

Do you know what could go wrong here?
Thanks for your support.

We’ll try to check what is wrong. Does the folder exist on your hard drive?

Yes, the folder does exist, but it looks like it is a special one: explorer displays it as “Shared Documents” but it appears in the full path as “Documents”. Anyway, this is the same behavior under Windows XP for which the problem does not occur.

I made some research and it looks like to be a bug of the Windows API that retrieves common folders. It is specific to Windows Server 2003. There’s nothing we can do. Check of the %COMMYDOCDIR% is empty. If yes, change it to another value or use a hard-coded path like %SYSROOT%\Documents and Settings\All Users\Documents :smile:

Then I guess that chances to get it fixed someday on this OS are rather weak, since support ends next July :). Thanks for your research and the workaround. In the meantime, I have used the following one:
if %OSVER% = 10, use %COMDESKTOPDIR% then replace "Desktop by “Documents” in the string.

Yes, it’s possible to do that too!

This topic was automatically closed after 24 hours. New replies are no longer allowed.