PDA

View Full Version : Variable %FONTSDIR% empty



NewsArchive
12-15-2009, 02:54 AM
Hi Friedrich,

on two customer computers (Windows Server 2003 Standard with Citrix),
the variable %FONTSDIR% is empty and this cause setup to fail but it is
possible to use the windows control panel to use fonts.

Any suggestions?

Markus

NewsArchive
12-15-2009, 02:54 AM
Hi Markus,

> on two customer computers (Windows Server 2003 Standard with Citrix), the
> variable %FONTSDIR% is empty and this cause setup to fail but it is
> possible to use the windows control panel to use fonts.
>
> Any suggestions?

GetSpecialFolder is used to retrieve CSIDL_FONTS. This API seems to fail on
the above machines.

Friedrich

NewsArchive
12-15-2009, 02:56 AM
Mmmh, this is strange. CSDIL_FONTS is filled.

Please have a look at the attached script and screenshot.

Markus

NewsArchive
12-15-2009, 02:56 AM
OK, I see, CSIDL_FONTS is filled, but wrong.

Where can I look in Windows to find this problem?

Markus

NewsArchive
12-15-2009, 02:56 AM
> OK, I see, CSIDL_FONTS is filled, but wrong.
>
> Where can I look in Windows to find this problem?

Unfortunately, I have no idea :-(

Friedrich

NewsArchive
12-15-2009, 02:57 AM
Hi Friedrich,

sure, there is a problem with the customers computer, but i guess with
SB too. Look at this results:

---------------------------
SHGetSpecialFolderPath
---------------------------
HWND = 0
PATH =
ERRORCODE = 0
RESULT = 0
LastError =
---------------------------

---------------------------
SHGetSpecialFolderPath SHGFP_TYPE_CURRENT
---------------------------
HWND = 0
PATH =
ERRORCODE = 0
RESULT = -2147467259
LastError =
---------------------------

---------------------------
SHGetSpecialFolderPath SHGFP_TYPE_DEFAULT
---------------------------
HWND = 0
PATH =
ERRORCODE = 0
RESULT = -2147024894
LastError =
---------------------------

---------------------------
Fontsdir
---------------------------
Fontsdir = ""
CSIDL_FONTS = "C:\Dokumente und
Einstellungen\Administrator.BUDENHEIM\Netzwerkumge bung"
LastError =
---------------------------


The variable %CSIDL_FONTS% hols the wrong value. It must be empty, but
it seems, that it holds the value of another CSIDL variable.

Markus

NewsArchive
12-15-2009, 02:58 AM
Hi Markus,

> sure, there is a problem with the customers computer, but i guess with SB
> too. Look at this results:

Unfortunately, we don't have any machine available to test this scenario.

But this is the original runtime source code:

if(SHGetPathFromIDList(pidl, recpath))
{
fRet = 1;
}
else
{
fRet = 0;
lstrcpy(recpath, "");
}

The variable "recpath" holds the returned system path. If the
SHGetPathFromIDList API "fails" (returns FALSE), then recpath is "cleared".

Friedrich

NewsArchive
12-16-2009, 02:33 AM
You can try to clear recpath BEFORE you call SHGetPathFromIDList. As you
can see in my results, the API does not "fail" (Returncode = 0), it
seems to just leave the variable "untouched". I will get access to this
"special" machine tomorrow.

Markus

NewsArchive
12-16-2009, 02:34 AM
Hi Markus,

> You can try to clear recpath BEFORE you call SHGetPathFromIDList. As you
> can see in my results, the API does not "fail" (Returncode = 0), it seems
> to just leave the variable "untouched". I will get access to this
> "special" machine tomorrow.

Not obvious from my previous code snippet, but the variable is initialized
with a value of "" at the beginning of the function.

Friedrich

NewsArchive
12-16-2009, 02:34 AM
We made a small modification in the runtime. The (built-in) variable that
is initialized before %_CSIDL_FONTS% is %_CSIDL_NETHOOD% (and I think that's
the value we see in your screenshot). No idea where this is coming from
because the variable is definitely "cleared" :-(

Friedrich

NewsArchive
12-16-2009, 02:37 AM
Should I test this for you? You can send me an internal build and I will
check this tomorrow.

Markus

NewsArchive
12-16-2009, 02:37 AM
Markus,

> Should I test this for you? You can send me an internal build and I will
> check this tomorrow.

That would be great. I have re-compiled your test project with the new
runtime:

http://www.lindersoft.com/projects/Your_Project_Name-1.zip

Thanks,
Friedrich

NewsArchive
12-16-2009, 03:47 AM
Hi Friedrich,

it seems to work (screenshot attached)

Markus

NewsArchive
12-16-2009, 03:48 AM
Hi Markus,

>
> it seems to work (screenshot attached)
>

Perfect, thank you!

Friedrich