PDA

View Full Version : Running script before just before windows logon...


P30N
09-28-2007, 02:13 PM
You know like when some spyware / anti-virus' tell you that they need to restart to remove infections and they run just before desktop starts?

Or like when sysinternals pagedefragmentor runs on restart you see a black screen with the information.

I need to know these locations so I can setup my script to run at that point.

Registry /folder location or command I am looking for.

soldier
09-28-2007, 02:34 PM
Start --> Run--> gpedit.msc

Click windows settings...Scripts...

phoenix31tt
09-28-2007, 02:56 PM
computer configuration --> windows settings --> scripts

this is where the are stored:

C:\WINDOWS\System32\GroupPolicy\Machine\Scripts\
and
C:\WINDOWS\System32\GroupPolicy\User\Scripts

however u must configure them in the gpedit.msc for them to actually run

P30N
09-28-2007, 03:02 PM
Well thats the obvious answer but its wrong.

I knew I should have specified not group policy.

phoenix31tt
09-28-2007, 03:14 PM
why would u want to run a startup script (before logon) without using group policy?...

unless u wanna run a logon script... then u just put it in the

C:\Documents and Settings\username\Start Menu\Programs\Startup

folder

soldier
09-28-2007, 03:15 PM
ent@ no group policy.. wtf..

ya@run scrpit in startup folder

P30N
09-28-2007, 03:27 PM
I would have thought my two examples were self explanatory but, how about removing malware / locked files manually? Or performing some action on the OS system files?

The point is it very possible, after all these programs don't use group policy do they?

Well I could run it as a service but that still isn't what I want...

ecktt
09-28-2007, 04:23 PM
I know exactly what P30n is talking about but i don't know how to do it. I will look into it though.

Paradoxxx
09-28-2007, 05:54 PM
hklm\software\microsoft\windows\currentversions\ru n

Does that help?

phoenix31tt
09-28-2007, 06:39 PM
i think that is the same as the startup scripts para...

what he looking for (@ least what i think)... is something that runs before the even the gui in windows loads...

for instants when u do a format in partition magic that requires u to reboot... it reboots and runs right after the "windows xp" screen.

Paradoxxx
09-29-2007, 01:01 PM
Ah! like the autoexec.bat of the past!

ecktt
09-30-2007, 02:57 PM
humm
Well try the autoexec.bat!
that might actually work!

P30N
10-01-2007, 12:19 PM
Well wikipedia to the rescue...
What I was looking for was the point after the kernel loads...Session Manager.

The point where autochk runs.

Now all I have to figure out is how to set the batch file to run...might have to convert it to a service/exe to run it from there.