How can i start a win32 program, after wininit.exe start , and before winlogon.exe start?

n21k1a jkjkn767c2ok 0 Reputation points
2024-04-10T06:10:02.4766667+00:00

i want to run a win32 program as early as possible.

can i run a win32 program , after wininit.exe start , and before winlogon.exe start?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,242 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Olaf Helper 40,916 Reputation points
    2024-04-10T06:22:40.1033333+00:00

    Only Windows Services can start before a user logon.


  2. MotoX80 32,066 Reputation points
    2024-04-11T22:23:08.72+00:00

    Why? You still have not explained what you are trying to do.

    If the machine is a VM, then mount the VHD at the VM level so that the machine sees it as a physical disk.

    If program.vhd is on a network share, the you will need to identify all Windows services that participate in the network stack and let them initilize before you try to mount the drive.

    You will also need to identify which Hyper-v services are required to host the virtual drive and also identify what Windows services those services depend on.

    If program.vhd is on your C:\ drive, then just copy the files to another folder on the C:\ drive and don't use a virtual drive.

    What are you trying to accomplish by using a VHD?

    Update: use a manual startup. For any service that references a program on the VHD, set its Startup Type to manual. Create a scheduled task and set it's trigger to begin the task On Startup. Set the task to run a program or script that mounts the VHD, verifies that it can be accessed, and then does a NET START for the services.

    0 comments No comments

  3. Wesley Li 5,040 Reputation points
    2024-04-12T02:01:41.5033333+00:00

    Hello

    Run the application as service may be an option.

    sc.exe create <new_service_name> binPath= "<path_to_the_service_executable>"

    Or we could try to configure the application as startup script with group policy.


  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more