View Full Version : Issues with using ControlService(hService, CustomCommand) and VISTA/Windows7?

08-22-2009, 08:11 AM
I currently have a Windows Service written in C# .NET 2.0 which is automatically started and runs under the LocalSystem account - lets call it Serv.exe - this service is responsible for performing administrative tasks (a bunch of them).

There is another application (lets call it A.exe written in C++) which is run under the USER account (non-administrator), this application communicates with the Service (Serv.exe), using custom commands (ControlService(hService, CustomCommand) to tell it what task to perform.

Now - this all works perfectly fine right now, using Windows 2000 and XP - but will this cause problem when migrating to VISTA and Windows7? I know people mentioned that in Vista services run in a different session (not exactly sure what that entails) - will there be any issues using ControlService(...) under OS's past XP?

Key point to recall is that A.exe (non-admin user account) is communicating with Serv.exe (Local System service) to perform tasks like:
- copy files, delete files, move files
- extract files, zip files
- run setup.exe's, apply .MSI files
- register COM objects
- affecting the registry
- etc...
(pretty much anything you could image)

I need to know if there will be porting problems, if so I'll completly change my approach now (while I have the time).
(and use Named Pipes instead)

The reason I was using ControlService(...) instead of Pipes or Sockets is due to the fact that I only communicate with the service once every 20-30mins and only to request a specific operation be performed (simply send a single integer one-way), I thought pipes/sockets might be overkill for my needs ... I could be wrong ...

Looking for some advice, any help would be much appreciated...