How To Check What All Programs Will Run When User Logged On To Computer.

Article translations Article translations
Article ID: 556012 - View products that this article applies to.
Author: Nirmal Sharma MVP
Expand all | Collapse all

SUMMARY

The following knowledgebase will tell you how you can check what all programs will run when user has logged on to the computer.

MORE INFORMATION

When user logs on to the computer the Winlogon service will use the following registry entry to run any programs (if specified):
 
HKLM\Software\Micrsofot\Windows\CurrentVersion\Run
HKLM\Software\Micrsofot\Windows\CurrentVersion\RunOnce
 
The above two registry entries are used by Winlogon service after user has logged on to the system successfully. The Winlogon service will create a list of programs to run.
 
Please note that domain policy may override this setting if specified. You can also use Group Policy settings to block any program to run.
 
You can use the following script to check the programs in Run or RunOnce registry key on remote computer.
 
*** Start ***
 
@echo off
 
Set RegQry=HKLM\Software\Microsoft\Windows\CurrentVersion\Run
Set RegQry1=HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
 
REG.exe Query \\remote_computer\%RegQry% > CheckRun.txt
REG.exe Query \\remote_computer\%RegQry1% > CheckRunOnce.txt
 
Echo Programs on Computer : Remote_Computer >> Programs.txt
 
For /F “Skip=5 Tokens=*” %%a In (CheckRun.txt) Do (
           Echo %%a >> Programs.txt
)
 
For /F “Skip=5 Tokens=*” %%a In (CheckRunOnce.txt) Do (
           Echo %%a >> Programs.txt
)
 
*** End ***
 
You can use PSEXEC (a tool from Sysinternals) to run this script remotely and then redirect the output in a Text file.

Properties

Article ID: 556012 - Last Review: September 25, 2007 - Revision: 1.0
APPLIES TO
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows 2000 Enterprise Edition
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows 2000 Service Pack 4
  • Microsoft Windows 2000 Standard Edition
Keywords: 
kbpubmvp kbpubtypecca kbhowto KB556012
COMMUNITY SOLUTIONS CONTENT DISCLAIMER
MICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES.

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com