Sign in to follow this  
Followers 0

Run a program in startup before anyone log in

7 posts in this topic

Posted (edited)

How do I make my exe run at startup before anyone log in.. While still in the welcome screen.

Second. This exe will need to run a different exe also ??? So I need the option that the exe that run before log in will be able to run other exe's still before log in...

Thank you very.

EDIT : I want that when runing the exe it will have a a option to make it that the exe will run in startup before log in... I dont want to manually make it so the exe will run before startup.. I want it to be controlled by the exe itself

Edited by oren

Share this post


Link to post
Share on other sites



Posted

Hi,

I'm not sure but I don't think that you can run anything (except for drivers maybe) before starting a valid session. That will be a serious security hole.

Regards

Tip

Share this post


Link to post
Share on other sites

Posted

A startup script in group policy. Look here for some information.

Share this post


Link to post
Share on other sites

Posted

If you open gpedit.msc you can specify a program/script to be run when the computer starts up, it's under "Computer Configuration/Windows Settings/Scripts/Startup". This creates a registry setting that tells the computer to run whatever you tell it to in there when it's booting up.

Share this post


Link to post
Share on other sites

Posted (edited)

A startup script in group policy. Look here for some information.

If you open gpedit.msc you can specify a program/script to be run when the computer starts up, it's under "Computer Configuration/Windows Settings/Scripts/Startup". This creates a registry setting that tells the computer to run whatever you tell it to in there when it's booting up.

Thank you but I need that my exe script will install itself.. So that it will go up before log ing, In startup.

I need to make it soo that when I give the exe to someone he will have the option that the script will run on startup before log-in (He will also have to option to remove it )

I want to make a checkbox Run with startup, So the user will be able to control it///

Is it possiable ?

Thank you.

Edited by oren

Share this post


Link to post
Share on other sites

Posted

Have your script do a RegWrite and change the setting for "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup". First check to see what's in there already, because there might be a key called "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\Scripts\Startup\0" or "...\1" etc. if there are previous startup scripts running, for instance if the computer is joined to a domain and AD Group Policy sets some start up scripts. Always add your script to +1 of the ones that are already in there.

You'll need to try it on a machine to see how that gpedit changes the registry key when it adds a new script to the registry to make sure your's works the same way. I leave it to you to figure that part out. :huh2:

Share this post


Link to post
Share on other sites

Posted

If this installing method is fully automated, make sure it also checks the registry run list to see if it is already in the list. If run by the system at startup with no commandline options or config file, it cannot know if it is being run for the first time by the user, or running as designed during boot..

,

Or you could simplify the code using commandline switches:

MyProgram.exe (No options) --> Run for first time by user, install mode

MyProgram.exe /run --> Startup method used in the GPO / registry, after installed

MyProgram.exe /remove --> Removal function to take out of GPO / registry

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.