Jump to content
Sign in to follow this  
Xenobiologist

Run script before windows logon

Recommended Posts

Xenobiologist

Hi,

I often saw the question whether it is possible to run an Autoit script before windows logon.

It is, ...

via group policy entry it is possible to start an Autoit script even with GUI interaction before logon.

But where is the information stored? Is it possible to add scripts here via Autoit?

gpedit.msc --> computer settings --> windows settings --> scripts --> start

If I add a script, the exe is not copied to path : C:\winnt\System32\GroupPolicy\Machine\Scripts\Shutdown

Anybody any furhter information?

Thanks

Mega

P.S.: Maybe this is only possible on special versions of Windows (e.g. >=Premium)

P.P.S.: I (want to) use this, to get the pin of my UMTS card and do a VPN logon directly in the windows domain without using the domain cache.

Edited by Xenobiologist

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
gianfun

Hey,

Maybe you could try making a simple bat file that starts the exe, and putting that in the scripts instead.

Something like

C:/program.exe

My own pocket emo http://www.mindistortion.net/pocketemo/?da...1-7-2-0-0-1-0-0LOL[quote name='beerman' post='399180' date='Sep 6 2007, 08:45 AM']I have learned, never think inside the box. The moment you have a bright idea, and stand up to quickly exclaiming, "Eureka, I have it!". You will knock yourself out, from bashing your head on the inside of the box as you stand... So in conclusion it is always safer to think outside the box. :)[/quote]

Share this post


Link to post
Share on other sites
Fire

Open regedit.exe go to this key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

then backup it.(export this key and keep)

Your first step is execute this reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

"Userinit"="C:\\WINDOWS\\system32\\userinit.exe,C:\\yourapp.exe"

Save it with *.reg extension adnd execute from admin rights.

Please note this C:\\yourapp.exe in here change to your exes.

I attempt you this way is very dangerius and many malicius apps use this method.

Edited by Sh3llC043r

[size="5"] [/size]

Share this post


Link to post
Share on other sites
suroit

Xenobiologist (or anyone else), did you try to follow Fire's recommendation? How does it work?

Fire, I am a little worried by your warning "very dangerous". What exactly is the danger, before I try to follow your method?

Thanks all.

Share this post


Link to post
Share on other sites
Thornhunt

iv ehard of the registry way befor... there is also adding it to the autoexec.bat however that can make the script extreemy unstable.. or adding it to the system folder (or somet like that) runs it under the system user.

hope this helps ?


Budweiser + room = warm beerwarm beer + fridge = too long!warm beer + CO2 fire extinguisher = Perfect![quote]Protect the easly offended ... BAN EVERYTHING[/quote]^^ hmm works for me :D

Share this post


Link to post
Share on other sites
XKahn

Xenobiologist (or anyone else), did you try to follow Fire's recommendation? How does it work?

Fire, I am a little worried by your warning "very dangerous". What exactly is the danger, before I try to follow your method?

Thanks all.

In the sense that the script could end up locking you out of the system. Greatly depends on the script's function. The method described executes at windows logon. One could exploit this to log someone's password.

A safer solution would be to run programs after you have logged into the system (after the password). Again this depends greatly on the program's function, for example most virus scanners start up after logon and use;

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

MyProcess C:\pathtoprocess\my_app.exe

Share this post


Link to post
Share on other sites
LarryDalooza

The userinit solution is for "before shell" execution... but certainly not "before log on".

Lar.


f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.