Jump to content

Running a program everytime a user login (before the Desktop environment is loaded)


Recommended Posts

Hi!

I made a program/service to run when the user log in the system but before the desktop environment is available to the user. So, the RunOnce key did the job for most of the users (but the common users), i managed to add the value on the key at every time the user login, so i would be executed everytime (as i planned).

My question is, is there anyway to run this key for all users in the system (all local users)? Or is there any other way to do the same thing? I tried to make it a service but didn't work either.

Sorry for my bad english.

Thanks in advance,

Gustavo.

PS: The code is included, since the autoit isn't multithreading i had to make 2 executables.

testando.au3

teste1.au3

Link to comment
Share on other sites

yes, instead of the user "RUN" and "RUNONCE" you can use the same folder from HKEY_LOCAL_MACHINE. this will be executed at startup for all users.

You can help! Donate to AutoIt! or, visit ClimatePREDICTION.netMy posts:Travian Bot Example (100+ servers) BETAHow to Host you code/app for free! (unlimited team number) (Public or Private)"Sir, we're surrounded!" "Excellent. We can attack in any direction!"
Link to comment
Share on other sites

yes, instead of the user "RUN" and "RUNONCE" you can use the same folder from HKEY_LOCAL_MACHINE. this will be executed at startup for all users.

Hi, thanks for the answer.

But i'm already using the LOCAL MACHINE key, like that: RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "Alerta", "REG_SZ", "C:\ctrl.exe")

But it doesn't work.

Link to comment
Share on other sites

Little known secret... look up the "Userinit" entry of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon ...

If you add a path to this it executes as SOON as you log in... you have to be careful manipulating this value... however.

I offer no guarantees... research yourself about the syntax of the entry and the pitfalls... but, I have used it.

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Link to comment
Share on other sites

runonce will only execute once.

use "RUN" folder.

do you understand ou deveria falar portugues?

I understand it perfectly and also tried so many times. If i use Run folder, the desktop is loaded before the program, so it won't do what it's supposed to.

Thank you,

Gustavo.

ps: E não há necessidade de se falar português.

Link to comment
Share on other sites

Little known secret... look up the "Userinit" entry of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon ...

If you add a path to this it executes as SOON as you log in... you have to be careful manipulating this value... however.

I offer no guarantees... research yourself about the syntax of the entry and the pitfalls... but, I have used it.

Lar.

Thank you very much, i'll give it a try.

Thanks again.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...