IE Logon script
On the SMS List we were talking about the changes that occured in SCCM for remote control and I suggested that people use a logon script that actually creates a log so that you didnt need to see it run to ensure that things where ok. this script allows you to do just that and it can be troubleshot from Ron’s web console.
This script was created by me a few years back to run as a logon script. It uses IE to display what was happening. Every task creates an entry in a log file on the system.
Attached is the logon script.
Logon Script Logon Script
Then I used the Webconsole to open the log if needed by the helpdesk.
Here is the code for the web console
You will need to put trace32.exe in your remote$ share
then add this button to the list of buttons
‘********************************
<input style="WIDTH: 175; color:#000000; background-color:#C7E2FF" type="button" name="Btnl21" ID="Button21" value="Logon Script Log" title="This button will display the Logon Script Log for the machine entered above">
‘*******************************
Add this to the bottom of the script where the other button numbers are.
You may need to change the button number if you have more then 21 buttons.
'*****************************************************************************
' Logon Survey
Sub Btnl21_OnClick
Dim CompName,oWshShell
CompName = trim(document.frmMain.txtValue.value)
if len(Trim(CompName)) = 0 then
MsgBox "Please type a Machine Name.",,"SMS 2003 Remote Control"
Else
set oWshShell = CreateObject("WScript.Shell")
Set objPing = GetObject("winmgmts://" & ServerName & "/root/default:PingPoller")
path = "\\{SMSServer}\remote$\Trace32.exe " & "\\" & CompName & "\C$\logonsurvey.txt"
objPing.Trace CompName, "30", "1000", "1", TraceResult, Addresses
if TraceResult <> 0 then
MsgBox "Machine did not respond to ping.",,"SMS 2003 Remote Control"
Else
oWshShell.run path
end If
end If
End Sub
'*************************************************************************************
Enjoy
Chris Stauffer <><