PDA

View Full Version : اجرای برنامه قبل از explorer windows



behzadk
جمعه 27 آذر 1388, 12:50 عصر
با سلام
آیا راهی وجود دارد که برنامه عین یک antivirus قبل از windows explorer اجرا بشه ؟

با تشکر

Saeed.Masoumi
دوشنبه 30 آذر 1388, 00:20 صبح
سلام:


How to launch a program before the shell (Explorer) starts.
Using the same technique, you can launch an application before the Shell, so as to avoid any interaction with it.
Leaving the Shell as Explorer.exe, edit:
HKEY_LOCAL_MACHINE\Software\Microsoft\WindowsNT\Cu rrentVersion\Winlogon\Userinit
Double-click Userinit and change the string which begins with USERINIT,NDDEAGNT.EXE..... to YourOwn.exe,NDDEAGNT.EXE..... or YourOwn.bat,NDDEAGNT.EXE.....
Place your EXE or BAT file in the %SystemRoot%\System32 directory.
Since USERINIT is responsible for executing the shell program, you must start it yourself at the end of your program or batch file.
Explorer.exe is the standard shell in Windows NT 4.0. It can operate in either of two modes:
Browser mode
Shell mode (to manage the desktop, taskbar, and Start button)
When USERINIT launches Explorer.exe, Explorer.exe checks that no instances of Explorer.exe are running and that it is the Shell. If both conditions are true, it starts in shell mode.

Example: (we changed the registry entry to USERINIT.BAT,NDDEAGNT.EXE.....)

@echo off
REM JSI USERINIT.BAT
call %SystemRoot%\System32\DelTemp.bat
%SystemRoot%\System32\Userinit.exe
exit

where %SystemRoot%\System32\DelTemp.bat contains:

@echo off
RD /q /s C:\Temp
MD C:\Temp

Note: Don't use an Exit command in any called batch file.
Your EXE or BAT file will execute without any interaction with the Shell.

لینک (http://windowsitpro.com/article/articleid/71795/jsi-tip-0470---how-to-launch-a-program-before-the-shell-explorer-starts.html) منبع