Issues copying fonts to the %FONTSDIR% on Windows Server 2008
Hi all,
our setup includes a few OCR-fonts which are copied to the %FONTSDIR% directory. The code generated in the script for each ocr font file is:
Install File "R:\OurPath\OCRB.ttf" to "%FONTSDIR%\OCRB.ttf" (Always install)
On the "ordinary" versions of Windows (XP, Vista, 7) this works very well, but when running the installation on Windows Server 2008, the setup stops and prompts the following error message (seems to be the xxxx_ERR_DIR_NOTWRITABLE): "The target directory %s is not writable or accessible. The installation cannot continue". Note also that the "%s" expression isn't replaced by anything so we can only see two spaces between "directory" and "is not". Behind this messagebox the "file copy progress" is shown and the file name being copied at the moment this fails is the OCRB.ttf font.
PS:
- This fails instantly on the first of the three font files in our script
- The %FONTSDIR% directory is certainly not read-only - e.g we are allowed to use a DOS-box and create/delete folders in the %FONTSDIR%.
- The user logged into our server running the installation is the administrator and the setup is also "run as administrator".
Would really appreciate some input on this matter! :-)
Re: Issues copying fonts to the %FONTSDIR% on Windows Server 2008
Hello,
That means that for whatever reason, the value for the %FONTSDIR% variable cannot be set at runtime in your case. The installer retrieves the fontsdir value by calling the SHGetSpecialFolderLocation API (CSIDL_FONTS).
HTH,
Friedrich
2 Attachment(s)
Re: Issues copying fonts to the %FONTSDIR% on Windows Server 2008
By the way, I have created a small test script and tested it on our Server 2008 (see attached screenshots).
It correctly displayed C:\Windows\Fonts as writable.
Friedrich
Re: Issues copying fonts to the %FONTSDIR% on Windows Server 2008
What you can try is to run the setup.exe in event logging mode (e.g. setup.exe /E) and then check the c:\sbevents.txt log. If the SHGetSpecialFolderLocation API fails then you should see "empty" {FONTSDIR} and %FONTSDIR% items.
|01/31/2012|11:42:12.554|Set Variable {WINVER} to 2048
|01/31/2012|11:42:12.554|Set Variable %WINVER% to 2048
|01/31/2012|11:42:12.554|Set Variable {CURLNG} to 1033
|01/31/2012|11:42:12.554|Set Variable %CURLNG% to 1033
|01/31/2012|11:42:12.554|Set Variable {WINDIR} to C:\Windows
|01/31/2012|11:42:12.554|Set Variable %WINDIR% to C:\Windows
|01/31/2012|11:42:12.554|Set Variable {SYSDIR} to %WINDIR%\System
|01/31/2012|11:42:12.554|Set Variable %SYSDIR% to %WINDIR%\System
|01/31/2012|11:42:12.554|Set Variable {SYS32DIR} to C:\Windows\SysWOW64
|01/31/2012|11:42:12.554|Set Variable %SYS32DIR% to C:\Windows\SysWOW64
|01/31/2012|11:42:12.569|Set Variable {FONTSDIR} to C:\Windows\Fonts
|01/31/2012|11:42:12.569|Set Variable %FONTSDIR% to C:\Windows\Fonts
Friedrich
Re: Issues copying fonts to the %FONTSDIR% on Windows Server 2008
Ok, here's the output from sbevents.txt in my case. As you wrote the value for the fonts directory isn't retrieved:
|01/31/2012|12:41:02.993|Set Variable {FONTSDIR} to
|01/31/2012|12:41:02.993|Set Variable %FONTSDIR% to
...so, what does this mean? :) ...i guess i can manually test for server OS and eventually set the %FONTSDIR% by myself?
Re: Issues copying fonts to the %FONTSDIR% on Windows Server 2008
The one million dollar question is, why does it fail on your machine ;)
IMO, it does not make sense to test for the Server OS because it works without any problem on Server ;) We have four Server 2008 machines here in-house and of course, it works without any problem. And most of our Script Writing Consulting projects install fonts on Server 2008/R2 and it never failed (with tens of thousands installations). I checked our bug reporting system and not a single report. So I "think" it's specific to your machine. But the question is why does the standard SHGetSpecialFolderLocation API (CSIDL_FONTS) fail for you.
Friedrich
Re: Issues copying fonts to the %FONTSDIR% on Windows Server 2008
What you can try is to check if %FONTSDIR% is empty. If this is the case, retrieve the value of the virtual fonts folder. I can't say for sure if this will work as expected because I have never seen an empty %FONTSDIR% variable.
Friedrich
Re: Issues copying fonts to the %FONTSDIR% on Windows Server 2008
Quote:
Originally Posted by
linder
The one million dollar question is, why does it fail on your machine ;)
IMO, it does not make sense to test for the Server OS because it works without any problem on Server ;) We have four Server 2008 machines here in-house and of course, it works without any problem. And most of our Script Writing Consulting projects install fonts on Server 2008/R2 and it never failed (with tens of thousands installations). I checked our bug reporting system and not a single report. So I "think" it's specific to your machine. But the question is why does the standard SHGetSpecialFolderLocation API (CSIDL_FONTS) fail for you.
Friedrich
Hehe, the problem is reported from some of our customers installing on their servers but we weren't aware of the problem until we tested it on our server earlier today. :)
1 Attachment(s)
Re: Issues copying fonts to the %FONTSDIR% on Windows Server 2008
Hi Christian,
;)
So the attached test application does not display a valid fonts folder on your machine, correct?
Friedrich
Re: Issues copying fonts to the %FONTSDIR% on Windows Server 2008
And if it does not display a valid fonts folder, what Fonts value entry do you see in your Shell Folders registry key?
Friedrich