Executing a process a startup of System?(Vista & Windows 2008) [modified]
-
Hello . I want to execute a process at startup of computer before the user has logged on to the machine. How should I do this , I had made a Winlogon pacakage for this but It supports os till Windows 2003 . For later versions of OS including Vista and Windows 2008 where they have removed the concept of Winlogon notify , can any body let me know the alternative for this. Regards, Kushagra
modified on Thursday, October 29, 2009 8:59 AM
-
Hello . I want to execute a process at startup of computer before the user has logged on to the machine. How should I do this , I had made a Winlogon pacakage for this but It supports os till Windows 2003 . For later versions of OS including Vista and Windows 2008 where they have removed the concept of Winlogon notify , can any body let me know the alternative for this. Regards, Kushagra
modified on Thursday, October 29, 2009 8:59 AM
I think your stuck with a
service
. There's lots of code examples on msdn, and here on codepeject for services, so I'd start your search there. Iain.I have now moved to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]
-
I think your stuck with a
service
. There's lots of code examples on msdn, and here on codepeject for services, so I'd start your search there. Iain.I have now moved to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]
Hi Iain, I got my solution . What I did was I made my service a part of ServiceGroup (SCSI Class) and by doing this I was able to start my service much before the Login Dialog comes into picture after the system is booted up and thus at this time I checked for Number of active users using api NetWkstaUserEnum . At this time the count comes to be zero and thus I am able to spawn my process at startup of the system even before the user has logged on. Somebody please mark this answer as this solution works fine. Regards, Kushagra
-
Hi Iain, I got my solution . What I did was I made my service a part of ServiceGroup (SCSI Class) and by doing this I was able to start my service much before the Login Dialog comes into picture after the system is booted up and thus at this time I checked for Number of active users using api NetWkstaUserEnum . At this time the count comes to be zero and thus I am able to spawn my process at startup of the system even before the user has logged on. Somebody please mark this answer as this solution works fine. Regards, Kushagra
-
?? Why so ??
-
?? Why so ??
-
I was not aware of the function NetWkstaUserEnum until I read your post. You enlightened me. That's why.
Oh is it :) If it helped it please mark the answer as good so that we can close the thread :) Kushagra