I am attempting to launch a Delphi Winform executable (with a command line argument) from a WinService, in an environment which does not support Interactive Services (i.e. Win7/XP SP3). Please see my original post (Q_26873780
) for reference.
I am using a C# variation of an excellent (ServiceShell) code snippet found in
to launch executables with command line arguments.
Unfortuntely the Delphi 'ParamCount' method always returns 0 when I use the aforementioned C# version of the ServiceShell call, whereas when calling other programs (such as notepad.exe) with a command line argument everything works perfectly.
Can anyone suggest an alternative to using ParamCount to determine my arguments? Or indeed any other method which might be at my disposal?