R
roger21
Hello,
I have an application which has to run as a windows service. This
application create a word instance via a library of mine with the call:
word::_ApplicationPtr myApp;
myApp.CreateInstance("Word.Application.11");
(it is wrote in VC++)
Fom here i have two problems:
First i would like Word to use a temporary directory of mine instaed of the
global \Windows\temp\ one. I tried tu use _putenv (to set TEMP and TMP) just
before calling Createinstance but Word doesn't care and i tried to set the
service as a user instead of System but Word keep using the global
\Windows\temp\ direectory. What is disturbing me is when i launch the
application in a console, not as a service the Word instance use the temp
directory specified by _putenv. So my question is: What i have to do to see
Word using my specified Temp directory.
My second problème is when i make a specific treatment with the application
launched as a service i get word to "freeze" at a certain point. I am quite
sure it is because it opens a popup dialog and wait until a user answer the
question (i got a similar problem before that i solved by catching the popup
in console mode and set the corresponding code to not display this dialog
again). And I can't see this dialog since word is launched from a service
(and there I can't reproduce the problem in console mode). I tried to set a
specific user for the service or tried to check the box "Allow service to
interact with desktop" but i got nothing. So my second question is what can i
do to get what word want?
I use the computer where the application is launched with remote connection
desktop i hope it does not affect the interactions between services and destop
thanks in advance for any advice
I have an application which has to run as a windows service. This
application create a word instance via a library of mine with the call:
word::_ApplicationPtr myApp;
myApp.CreateInstance("Word.Application.11");
(it is wrote in VC++)
Fom here i have two problems:
First i would like Word to use a temporary directory of mine instaed of the
global \Windows\temp\ one. I tried tu use _putenv (to set TEMP and TMP) just
before calling Createinstance but Word doesn't care and i tried to set the
service as a user instead of System but Word keep using the global
\Windows\temp\ direectory. What is disturbing me is when i launch the
application in a console, not as a service the Word instance use the temp
directory specified by _putenv. So my question is: What i have to do to see
Word using my specified Temp directory.
My second problème is when i make a specific treatment with the application
launched as a service i get word to "freeze" at a certain point. I am quite
sure it is because it opens a popup dialog and wait until a user answer the
question (i got a similar problem before that i solved by catching the popup
in console mode and set the corresponding code to not display this dialog
again). And I can't see this dialog since word is launched from a service
(and there I can't reproduce the problem in console mode). I tried to set a
specific user for the service or tried to check the box "Allow service to
interact with desktop" but i got nothing. So my second question is what can i
do to get what word want?
I use the computer where the application is launched with remote connection
desktop i hope it does not affect the interactions between services and destop
thanks in advance for any advice