Connect with Expertise | Find Experts, Get Answers, Share Insights

Unable to launch a xe when using Createprocess

 
Join Date: Mar 2010
Posts: 4
#1: Mar 16 '10
Hello,
My requirement is to launch a program (exe) automatically when the system boots. The program needs to run in minimised mode.So what I am doing is created a windows service, starting at automatic mode which will launch this program. I am using a createprocess to launch the program.

CreateProcess ( NULL,
processCCVName,
NULL,
NULL,
FALSE,
NORMAL_PRIORITY_CLASS,
NULL,
NULL,
&startCCV,
&processCCV )
My program links to some dlls, when it comes up. The problem I am experiencing is that the program is not able to find the dlls, when it is coming up.
Any help is highly appreciated. The Program that is being called is third party software and hence I cannot make any modifications to that.

E
M
C
 
Join Date: Mar 2007
Location: North Bend Washington USA
Posts: 5,986
#2: Mar 16 '10

re: Unable to launch a xe when using Createprocess


Can it find the dlls after the system is up and running?

Try it that way. If it finds the dlls, then it is a problem in the boot.

You don't say where in the boot you create this process. Are dll services available yet?
 
Join Date: Mar 2010
Posts: 4
#3: Mar 16 '10

re: Unable to launch a xe when using Createprocess


My program and its dll are available in C:\program Files\MyProgram floder. So at boot the automatic service will start. When it starts, it calls the program ( using create process). The program launhes, but does not find the dlls. To remove the codition you mentioned I started the service manually after windows is up and running steady. But no luck.
E
M
C
 
Join Date: Mar 2007
Location: North Bend Washington USA
Posts: 5,986
#4: Mar 16 '10

re: Unable to launch a xe when using Createprocess


This program thatr can't find the dlls, how is it looking for them? LoadLibrary() by chance?
 
Join Date: Mar 2010
Posts: 4
#5: Mar 16 '10

re: Unable to launch a xe when using Createprocess


The program is a third party software, I just have the binary so not very sure
 
Join Date: Mar 2010
Posts: 4
#6: Mar 16 '10

re: Unable to launch a xe when using Createprocess


I want to add, tha if I double click the program in the same loction,it workd
jkmyoung's Avatar
E
M
C
 
Join Date: Mar 2006
Posts: 1,938
#7: Mar 16 '10

re: Unable to launch a xe when using Createprocess


Perhaps the path in which the program running is the problem. If so, you can either change the runpath, or perhaps the PATH environment variable.
Reply

Tags
createprocess, windows service