How to run Application.exe before windows startup?
Asked Answered
O

6

20

I have a windows application with user Interface that do some stuff... Now my client wants that, when he pushes the power button MyApplication run before he forced to input the username and password! comment: the system is multi user on windows XP or Seven.

Is it possible anyway?

Obmutescence answered 19/9, 2012 at 8:54 Comment(3)
This and this might help.Maleki
Will Lasalle's answer works perfect and does not require Group policies or windows services.Aleman
write your program as a windows service.Curch
G
19

It is simple. The process is.

  1. Run gpedit.msc
  2. Go to computer Configuration -> Windows Setting -> Scripts(Startup/shutdown)
  3. Go to Startup properties then you will get the new windows.
  4. Now add the program that you want to run before login.
Grind answered 19/9, 2012 at 9:0 Comment(6)
That setting belongs to the user.Sawyere
thank you but it didnt work for me.Are you sure that application.exe could run before startup?Obmutescence
You are a genius. No one else on the internet seems to know about this. It works great, especially for apps that need to run with UI. After hours of failed testing with services, scheduled tasks, etc., it works. Thank you!Khajeh
@BillyONeal It shouldn't, if you're under computer configuration.Munro
Would this also work for opening documents with the standard application that is assigned to the document's filename extension? Specifically, I'd like to run an AutoHotkey script before Windows login, the script being an *.ahk document that is assigned to AutoHotkey.exe. Can I simply use the script's name and path for the startup script?Bookshelf
Word of warning: Startup scripts and scheduled tasks will NOT work with GUI-based apps. Your best bet is to auto-login (learn.microsoft.com/en-us/sysinternals/downloads/autologon) and have such applications launch based on login (C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup).Beverie
B
19

I found the way to do this was to create a scheduled task with a trigger for "on startup". This starts the application before windows logon. This is particularly useful in a server type environment if you need to have something run that is not a service.

Bus answered 15/12, 2017 at 2:39 Comment(0)
S
4

The right way to do this is to implement a Windows service.

Sawyere answered 20/9, 2012 at 4:22 Comment(0)
S
2

I've used this article here as I run a Minecraft server which I need to have the console interactive so I can manage the server and running it as a service is not a good solution in such a case: https://www.tenforums.com/tutorials/138685-turn-off-automatically-restart-apps-after-sign-windows-10-a.html

What I did was edit the registry:

  1. Go to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  2. Create a new DWORD value (if this DWORD doesn't exist already) and call it RestartApps with the value of 1

This now starts apps that usually startup before you log in and starts the programs in shell:startup

Skeen answered 10/7, 2020 at 23:48 Comment(0)
B
1

Startup scripts and scheduled tasks will NOT work with GUI-based apps. Your best bet is to setup auto-login (https://learn.microsoft.com/en-us/sysinternals/downloads/autologon) and have such applications launch based on login (C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup or any other method).

Beverie answered 21/8, 2023 at 19:25 Comment(0)
K
-12

You can not run an exe without first loading the operating system. You can, however, run the exe without logging in first. Just add copy and paste the shortcut for the exe into C:\Documents and Settings\Administrator[or other user name]\Start Menu\Programs\Startup. Then check msconfig to make sure your exe is checked to run on startup.

Kneepad answered 26/10, 2013 at 23:53 Comment(1)
Doesn't programs in Startup folder run AFTER user login?Benitobenjamen

© 2022 - 2024 — McMap. All rights reserved.