|
|
#1 (permalink) |
|
Guest
Posts: n/a
|
Hi,
I have a product that includes ATL service. The deployment is done through MSI using VS setup and deployment project and i use ORCA to edit the db. I want to install the service depending upon the condition provided by user during install. For that purpose i have written a custom dll in C++. This dll exposes two function. One is called after InstallInitialize and another one is called after InstallFinalize. IN the second function, I check the user condition and then register the service. For this I have used ShellExecuteEx API (servicename.exe -service). This api returns success but the service is not getting registered. What is the recommended way to the register and start the service and that too in C++ custom dll? Thanks & regards, Sujata. |
|
|
|
#2 (permalink) |
|
Guest
Posts: n/a
|
Hi Phil,
I am using the same MSI for the upgrade purpose. So I thought I have to use dll for custom action where I will check if the application is installed as service, then upgrade it as a service and then there I will not have to display message box to asking whether to install application as service or not. Could you please explain me (or point to any tutorials) in steps how can I have this checkboxes using VS setup project? Thanks, Sujata. "Wilson, Phil" wrote: > I'm not sure why you're using ShellExecute here - you're installing the > program, and VS setups will let you make an install custom action that > points to the exe and has -service as arguments. There's no need for Orca > as far as I can tell from what you're doing, or for Dll calls. > > The usual way to deal with choices in VS setups is to use one of the canned > dialogs like Checkboxes. Then you use the property name in a condition > (something like CHECKBOXESA=1) on the custom action (and on the service exe > too in the file system view if you like). > -- > Phil Wilson > The Definitive Guide to Windows Installer > http://www.apress.com/book/view/1590592972 > > > "Sujata" <Sujata@discussions.microsoft.com> wrote in message > news:BAB01527-9F67-484A-81D1-8F72D93DC744@microsoft.com... > > Hi, > > > > I have a product that includes ATL service. The deployment is done through > > MSI using VS setup and deployment project and i use ORCA to edit the db. > > I want to install the service depending upon the condition provided by > > user > > during install. For that purpose i have written a custom dll in C++. This > > dll > > exposes two function. One is called after InstallInitialize and another > > one > > is called after InstallFinalize. IN the second function, I check the user > > condition and then register the service. For this I have used > > ShellExecuteEx > > API (servicename.exe -service). This api returns success but the service > > is > > not getting registered. > > What is the recommended way to the register and start the service and that > > too in C++ custom dll? > > > > Thanks & regards, > > Sujata. > |
|
|
|
#3 (permalink) |
|
Guest
Posts: n/a
|
I'm not sure why you're using ShellExecute here - you're installing the
program, and VS setups will let you make an install custom action that points to the exe and has -service as arguments. There's no need for Orca as far as I can tell from what you're doing, or for Dll calls. The usual way to deal with choices in VS setups is to use one of the canned dialogs like Checkboxes. Then you use the property name in a condition (something like CHECKBOXESA=1) on the custom action (and on the service exe too in the file system view if you like). -- Phil Wilson The Definitive Guide to Windows Installer http://www.apress.com/book/view/1590592972 "Sujata" <Sujata@discussions.microsoft.com> wrote in message news:BAB01527-9F67-484A-81D1-8F72D93DC744@microsoft.com... > Hi, > > I have a product that includes ATL service. The deployment is done through > MSI using VS setup and deployment project and i use ORCA to edit the db. > I want to install the service depending upon the condition provided by > user > during install. For that purpose i have written a custom dll in C++. This > dll > exposes two function. One is called after InstallInitialize and another > one > is called after InstallFinalize. IN the second function, I check the user > condition and then register the service. For this I have used > ShellExecuteEx > API (servicename.exe -service). This api returns success but the service > is > not getting registered. > What is the recommended way to the register and start the service and that > too in C++ custom dll? > > Thanks & regards, > Sujata. |
|
|
|
#4 (permalink) |
|
Guest
Posts: n/a
|
There's a walkthrough here that uses the VS checkboxes dialog.
http://msdn.microsoft.com/en-us/libr...fd(VS.80).aspx -- Phil Wilson The Definitive Guide to Windows Installer http://www.apress.com/book/view/1590592972 "Sujata" <Sujata@discussions.microsoft.com> wrote in message news:7C9037DF-42E6-419A-B19A-177017ACAFF0@microsoft.com... > Hi Phil, > > I am using the same MSI for the upgrade purpose. So I thought I have to > use > dll for custom action where I will check if the application is installed > as > service, then upgrade it as a service and then there I will not have to > display message box to asking whether to install application as service or > not. > > Could you please explain me (or point to any tutorials) in steps how can I > have this checkboxes using VS setup project? > > Thanks, > Sujata. > > "Wilson, Phil" wrote: > >> I'm not sure why you're using ShellExecute here - you're installing the >> program, and VS setups will let you make an install custom action that >> points to the exe and has -service as arguments. There's no need for >> Orca >> as far as I can tell from what you're doing, or for Dll calls. >> >> The usual way to deal with choices in VS setups is to use one of the >> canned >> dialogs like Checkboxes. Then you use the property name in a condition >> (something like CHECKBOXESA=1) on the custom action (and on the service >> exe >> too in the file system view if you like). >> -- >> Phil Wilson >> The Definitive Guide to Windows Installer >> http://www.apress.com/book/view/1590592972 >> >> >> "Sujata" <Sujata@discussions.microsoft.com> wrote in message >> news:BAB01527-9F67-484A-81D1-8F72D93DC744@microsoft.com... >> > Hi, >> > >> > I have a product that includes ATL service. The deployment is done >> > through >> > MSI using VS setup and deployment project and i use ORCA to edit the >> > db. >> > I want to install the service depending upon the condition provided by >> > user >> > during install. For that purpose i have written a custom dll in C++. >> > This >> > dll >> > exposes two function. One is called after InstallInitialize and another >> > one >> > is called after InstallFinalize. IN the second function, I check the >> > user >> > condition and then register the service. For this I have used >> > ShellExecuteEx >> > API (servicename.exe -service). This api returns success but the >> > service >> > is >> > not getting registered. >> > What is the recommended way to the register and start the service and >> > that >> > too in C++ custom dll? >> > >> > Thanks & regards, >> > Sujata. >> |
|