Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows shell scripting

Status
Not open for further replies.

awise

IS-IT--Management
Dec 11, 2001
85
Windows 2000 AD - Using WSH Scripting

I want to add some script code to our logon script where if
the user is logging onto a specified server (destination computer name) that a specified sub routine in the logon script won't run.

If logging onto computer A, then bypass the following routine so that code will not run.

Appreciate any tips or suggestions.

Thanks,

zaw
 
Code:
Set WSHNetwork = Createobject("Wscript.Network")
strComputer = WSHNetwork.ComputerName

If UCase(strComputer) = "SERVERNAME" Then
   Wscript.Quit
End If

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top