I had a window service program that invokes command scripts from bat/cmd
files using the C function "system", compiled using Visual Studio 2005. When
the scripts are invoked in Windows 2000, console windows pop up and
disappear. Though a little annoying, these windows helps a lot when an error
happens as the window will stay on.
In Vista, there is no console window at all thus it is difficult to tell an
error in the scripts. Is there a setting somewhere in Vista that disable the
console ?
I have tried another function "spawn" but it doesn't work either.
Is there a function that will bring up the console even in Vista window
service ?
Please help.
ltkhoo
Starting with Windows Vista the logon session 0, which is used to
run services, is completely isolated form any GUI facilities.
Interacting with user's desktop from service considered to be
unsafe and constitutes a security risk. You will need to develop
some kind of interaction protocol between the servioce and
currently logged user session. Alternatively, you can mainatan
detailed log file within the service.
For more info about services under Vista read here:
"Services in Windows Vista"
http://go.microsoft.com/fwlink/?LinkId=71280
Pay attention to "Session 0 Isolation" section.
HTH
Alex