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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon script to terminate internet connection 1

Status
Not open for further replies.

seaport

MIS
Jan 5, 2000
923
US
I have a windows xp (sp2) PC and need to have a logon script that terminate network connection as well as internet connection when certain users log on. In other words, when those users log on, the PC will work like a stand alone computer.

Any advices on how to write the script? I know DOS and vbscript a little bit. But I do not know the exact command to do that.

Thanks in advance.

Seaport
 
Linney,

It takes a while for me to get back on this project. Thanks for the links. I tested the registry approach and found out that it only disabled connection for IE, not Firefox, which most of my users used.

The netsh command seems promising. I googled it and found out the following MS KB article.


In the article, it gives a netsh command to stop traffic to the network adapter.

Code:
netsh interface ip set address interface_name static ip_addresssubnet_maskdefault_gatewaymetric

what is "interface_name"? Could you give me a real example for that command?

Seaport
 
I don't really know, someone must though, best I can come up with is a few links. What does this show you from a Command prompt?

netsh interface ipv4 show interface




Netsh interface name


 
here is what I got.

C:\>netsh interface ipv4 show interface
The following command was not found: interface ipv4 show interface.


seaport
 
See if you can follow the story here. I always run in to Vista XP Syntax problems. Follow my mistakes and learn from them. Mind you I have no idea if this is even relevant to your original question. This by the way was run on a Virtual XP machine from within Vista.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\XXXXXXX>netsh interface ipv4 show interface
The following command was not found: interface ipv4 show interface.

C:\Documents and Settings\XXXXXXX>netsh interface ip show interface

The Routing and Remote Access Service is not currently running on the local machine.
Please use 'net start remoteaccess' on the machine to start the service.


C:\Documents and Settings\XXXXXXX>net start remoteaccess
System error 1058 has occurred.

The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.


C:\Documents and Settings\XXXXXXX>net start remoteaccess
The Routing and Remote Access service is starting.
The Routing and Remote Access service was started successfully.


C:\Documents and Settings\XXXXXXX>netsh interface ip show interface

MIB-II Interface Information
------------------------------------------------------
Index: 1
User-friendly Name: Loopback
GUID Name: Loopback
Type: Loopback
MTU: 32768
Speed: 10000000
Physical Address:
Admin Status: Up
Operational Status: Operational
Last Change: 0
In Octets: 0
In Unicast Packets: 0
In Non-unicast Packets: 0
In Packets Discarded: 0
In Erroneous Packets: 0
In Unknown Protocol Packets: 0
Out Octets: 0
Out Unicast Packets: 0
Out Non-unicast Packets: 0
Out Packets Discarded: 0
Out Erroneous Packets: 0
Output Queue Length: 0
Description: Internal loopback interface for 127.0.0 netw
ork

Index: 2
User-friendly Name: Local Area Connection
GUID Name: {9EE361DF-E9D7-44A2-812F-DA2CCC7F1DCE}
Type: Ethernet
MTU: 1500
Speed: 100000000
Physical Address: 00-03-FF-B7-F3-A7
Admin Status: Up
Operational Status: Operational
Last Change: 3806931386
In Octets: 39727
In Unicast Packets: 96
In Non-unicast Packets: 50
In Packets Discarded: 0
In Erroneous Packets: 0
In Unknown Protocol Packets: 0
Out Octets: 19199
Out Unicast Packets: 95
Out Non-unicast Packets: 41
Out Packets Discarded: 0
Out Erroneous Packets: 0
Output Queue Length: 0
Description: Intel 21140-Based PCI Fast Ethernet Adapter
(Generic) - Packet Scheduler Miniport



C:\Documents and Settings\XXXXXXX>
 
Linney,

I am not a system admin person and this task is way over my head. I think I have to put it on hold right now.

Thanks for all your efforts.

Seaport
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top