[R-SIG-Finance] How to use RDCOMClient (RBloomberg 0.1-11) without Admin rights
schubert
schubert74 at gmx.net
Fri May 28 19:38:10 CEST 2010
I’m using RBloomberg since November on a Windows XP machine and it works
very well. Now I had to install it on another Bloomberg machine which
has the same hard- and software installation. But every time I tried to
connect to Bloomberg over COM Api (RDCOMClient) - RGUI crashed. After
searching a lot in the internet I found that a lot of people have
problems to use RBloomberg (version with RDCOMClient) without
administrator rights. Funny – because the user on the pc were the
download worked also had no admin rights. Therefore I tested a lot with
RDCOMClient and the Excel Examples and came to the conclusion that the
problem isn’t a RBloomberg Problem – it’s only a problem with the
RDCOMclient.
The problem can be tested with these lines of code (part of test2.R from
RDCOMClient):
library(RDCOMClient)
xl <- COMCreate("Excel.Application")
xl[["Visible"]] <- TRUE # here - RGUI crashes!
RGUI.exe crashes after using/accessing a COM Object which was already
created. Why?
After searching a lot in different forums and giving access-rights to
the different directories (like R, RDCOMClient, Bloomberg/API) I didn’t
came to a solution.
Only when I tried to read the source code of RDCOM-Client I discovered
something strange. In some errorcase a log-file “RDCOM.err” will be
created directly in the root directory of C:\
The Problem is that in most companies normal users do not have access
rights to the root directory of C:\ and so the error log file can not be
written (if it isn’t created) or changed (append with new text). In this
case – RGUI crashes.
If an admin creates this file (if it doesn’t exists) and give the user
full access (read, write, change) to this file, the RDCOMClient will
work – at least it worked on my pc.
A better solution would be to change the source code of RDCOMClient in
COMError.cpp – and change there the path from C:\\RDCOM.err to a
location where the user is allowed to write/change files . e.g. a user
directory.
I hope I can help other users with this information to use this great
library on pc's without admin rights.
Best regards
Thomas Schubert
PS: By the way - c:\RDCOM.err can get very very huge..
More information about the R-SIG-Finance
mailing list