Query regarding launching of exe through sys file

Hi All,

Is it possible to launch an exe (or any kind of service) or any
application through sys file which is loaded statically at the time of
booting.
If possible then what is the mechanism to do that?

Thanks & Regards,

Maitri Ved| E-DRM | Tech Mahindra

Oberoi Garden Estate, Chandivali, Mumbai - 72

( Office: +91-22-66882000 | Extn: 8092

Email: xxxxx@techmahindra.com mailto:xxxxx

www.techmahindra.com http:</http:>

============================================================================================================================

Disclaimer:

This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally and http://tim.techmahindra.com/Disclaimer.html internally within Tech Mahindra.

============================================================================================================================</mailto:xxxxx>

You should use an auto-start service and do this from user mode. Doing this from kernel mode is complicated and undocumented. There are many aspects (figuring out the right TS session, winstation, desktop, connecting to CSRSS, ?) that stand in the way of your doing this from a Win32 program directly from kernel mode, even if you reverse engineered the raw process creation APIs.

  • S

From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Maitri Ved
Sent: Wednesday, December 31, 2008 12:20 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] Query regarding launching of exe through sys file

Hi All,

Is it possible to launch an exe (or any kind of service) or any application through sys file which is loaded statically at the time of booting.
If possible then what is the mechanism to do that?

Thanks & Regards,

Maitri Ved| E-DRM | Tech Mahindra
Oberoi Garden Estate, Chandivali, Mumbai - 72
? Office: +91-22-66882000 | Extn: 8092
Email: xxxxx@techmahindra.commailto:xxxxx
www.techmahindra.comhttp:</http:>


NTFSD is sponsored by OSR

For our schedule debugging and file system seminars
(including our new fs mini-filter seminar) visit:
http://www.osr.com/seminars

You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
============================================================================================================================

Disclaimer:

This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally and http://tim.techmahindra.com/Disclaimer.html internally within Tech Mahindra.

============================================================================================================================</mailto:xxxxx>

> Is it possible to launch an exe (or any kind of service) or any application through sys file

If the .exe you want to launch is a third party utility then using event mechanism between driver and service, you can launch third party .exe through service when driver will set the event.

You can refer following post
http://www.osronline.com/showThread.cfm?link=35916
http://www.osronline.com/ShowThread.cfm?link=105627

It’s much simpler :slight_smile:

Include the usermode service (exe) into dependencies
of a non-PnP driver (the latter also is a service, as
has been recently established).
So when you start the driver via “net start”, the exe will
start as well. Works on XP SP3, haven’t tested on other systems.

And there are other similar tricks.

Happy new year!
–PA

Skywing wrote:

You should use an auto-start service and do this from user mode. Doing
this from kernel mode is complicated and undocumented. There are many
aspects (figuring out the right TS session, winstation, desktop,
connecting to CSRSS, ?) that stand in the way of your doing this from a
Win32 program directly from kernel mode, even if you reverse engineered
the raw process creation APIs.

  • S

*From:* xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] *On Behalf Of *Maitri Ved
*Sent:* Wednesday, December 31, 2008 12:20 AM
*To:* Windows File Systems Devs Interest List
*Subject:* [ntfsd] Query regarding launching of exe through sys file

Hi All,

Is it possible to launch an exe (or any kind of service) or any
application through sys file which is loaded statically at the time of
booting.

If possible then what is the mechanism to do that?

*Thanks & Regards,*

*Maitri Ved**|** E-DRM **|** **Tech Mahindra*

Oberoi Garden Estate, Chandivali, Mumbai - 72

( Office: +91-22-66882000 *|* Extn: 8092

Email: xxxxx@techmahindra.com mailto:xxxxx
>
> www.techmahindra.com http:</http:>
>
>
>
>
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> You are currently subscribed to ntfsd as: unknown lmsubst tag argument: ‘’
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
> ============================================================================================================================
>
> Disclaimer:
>
> This message and the information contained herein is proprietary and
> confidential and subject to the Tech Mahindra policy statement, you may
> review the policy at http://www.techmahindra.com/Disclaimer.html
> externally and http://tim.techmahindra.com/Disclaimer.html internally
> within Tech Mahindra.
>
> ============================================================================================================================
>
>
>
></mailto:xxxxx>

> Is it possible to launch an exe (or any kind of service) or any application through sys file which is

loaded statically at the time of booting.

No.

CreateProcess does lots of undocumented things, so this is hardly doable.

The proper solution depends on whether the EXE needs any UI.

If yes - then the solution is to register the EXE in Run key same way as, say, Live Messenger is registered. You cannot show UI from the OS logon screen anyway.

If no - then service is the solution.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com