oren Posted June 7, 2011 Share Posted June 7, 2011 (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 June 8, 2011 by oren Link to comment Share on other sites More sharing options...
tip Posted June 7, 2011 Share Posted June 7, 2011 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 [center]MsgBox_Tipped: Eye candy msgboxes/inputboxes/loginboxes. | CreateBlankBox: Semi-transparent layers with borders and rounded corners.[/center] Link to comment Share on other sites More sharing options...
MHz Posted June 7, 2011 Share Posted June 7, 2011 A startup script in group policy. Look here for some information. Link to comment Share on other sites More sharing options...
BrewManNH Posted June 7, 2011 Share Posted June 7, 2011 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. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
oren Posted June 8, 2011 Author Share Posted June 8, 2011 (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 June 8, 2011 by oren Link to comment Share on other sites More sharing options...
BrewManNH Posted June 8, 2011 Share Posted June 8, 2011 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. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Javik Posted June 10, 2011 Share Posted June 10, 2011 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now