>Thanks Hilmar. I read your thread last night but I have not had a chance to dig into it or test it.
>The app is not a VFP app, it is a .NET Windows Form app. Do you know of any issues using RunAsSvc.exe in conjunction with a .NET Win Forms app?
It should be able to register any EXE. However, even though it appears as a service, the EXE might shut down when the user logs off.
>My customer tried to configure Windows Server (2003 I think) using M$ reccomended ways but the service started and then stopped just like you reported.
>
>What is the purpose of SYS(2340,1)? I have not dealt with VFP in a long time but am curious.
Well, this is a key element... The Visual FoxPro manual says:
SYS(2340) - NT Service Support
Remarks: This function intercepts Windows logoff messages (WM_QUERYENDSESSION and WM_ENDSESSION) to Visual FoxPro and specifies whether to keep Visual FoxPro COM Server instances running or to shut them down. A Visual FoxPro application will terminate when the current user logs off Windows. If the application is a Windows Service, then that service will terminate. Enabling support for NT service will make it possible for Visual FoxPro applications to continue even if the current user logs off Windows.I guess you can register any EXE to run as a service, but you may have to find the equivalent to sys(2340) in dotnet, to keep your EXE in memory after logout.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)