Problem in registering a 32 bit C++ COM/ATL Service on Windows7 64 bit?
-
Hi friends, My product have a ATL/COM based C++ service (32 bit). It get registered and run fine on XP 32 bit and Vista 32 bit. But now I want to run the same on Windows7 64 bit also. I tried to register the service the following way: 1 I did Copy MyService.exe at C:\Windows\SysWOW64. 2 Then executing "C:\Windows\SysWOW64\MyService.exe" -RegServer from Start->Run 3 Then executing "C:\Windows\SysWOW64\MyService.exe" -Service from Start->Run But my service is not getting registered. While registering it, I don't get any error message. Also I didn't find any entry in event viewer (I saw event viewer first time. Don't know where to see the log about registration of my service). And I didn't find entry for my service at Control Panel\Administrative Tools\Services. Please advise me how can I register my service? Thanks in Advance Regards
-
Hi friends, My product have a ATL/COM based C++ service (32 bit). It get registered and run fine on XP 32 bit and Vista 32 bit. But now I want to run the same on Windows7 64 bit also. I tried to register the service the following way: 1 I did Copy MyService.exe at C:\Windows\SysWOW64. 2 Then executing "C:\Windows\SysWOW64\MyService.exe" -RegServer from Start->Run 3 Then executing "C:\Windows\SysWOW64\MyService.exe" -Service from Start->Run But my service is not getting registered. While registering it, I don't get any error message. Also I didn't find any entry in event viewer (I saw event viewer first time. Don't know where to see the log about registration of my service). And I didn't find entry for my service at Control Panel\Administrative Tools\Services. Please advise me how can I register my service? Thanks in Advance Regards
Did you install your service first? How was your service is installed in XP 32? Service is installed with CreateSerice() API. Check out how this was handled in XP 32 case. You can have your own logs during CreateService() API and see what went wrong in Win7 x64. I am not sure why you need to copy the MyService.exe in SysWow64 folder. Your service Dll\EXE can be anywhere.
-Prashanth Jaligama
-
Did you install your service first? How was your service is installed in XP 32? Service is installed with CreateSerice() API. Check out how this was handled in XP 32 case. You can have your own logs during CreateService() API and see what went wrong in Win7 x64. I am not sure why you need to copy the MyService.exe in SysWow64 folder. Your service Dll\EXE can be anywhere.
-Prashanth Jaligama
Hi Prashanth, Thanks for replying me. Finally I got the answer for my query. To run a command in Start->RUN (on Windows7 or Vista) with escalated rights we should press Ctrl+Shift+Enter. It will then run the command with admin rights. Earlier since I was pressing Enter only, service was not getting registered. About placing the service in SysWow64, since all my binaries are in SysWow64, I am placing the service's exe there only. Regards Aseem
-
Hi Prashanth, Thanks for replying me. Finally I got the answer for my query. To run a command in Start->RUN (on Windows7 or Vista) with escalated rights we should press Ctrl+Shift+Enter. It will then run the command with admin rights. Earlier since I was pressing Enter only, service was not getting registered. About placing the service in SysWow64, since all my binaries are in SysWow64, I am placing the service's exe there only. Regards Aseem
HI Aseem, Good to know that you solved your issue. alternatively you can elevate run prompt from Task Manager. Go to TaskManager click on Processes Tab Click on Show process from All users Go to File Menu->New Task This allows the execute command in admin mode. Thanks Prashanth