Networking Forums

Networking Forums > Computer Networking > Windows Networking > Remotely change Gateway

Reply
Thread Tools Display Modes

Remotely change Gateway

 
 
Gemat - PCSC computer shop
Guest
Posts: n/a

 
      05-14-2007, 06:10 AM
Is it possible to change the gateway of a client PC, part of a workgroup,
remotely from another PC that belongs to the same workgroup??
 
Reply With Quote
 
 
 
 
Myweb
Guest
Posts: n/a

 
      05-14-2007, 06:25 AM
Hello Gemat - PCSC computer shop Gemat - PCSC computer,

Which OS did you use? With XP and higher use Remote Desktop and for 2000
and lower you can use VNC ( http://www.realvnc.com/ ) to connect to the desktop.

Best regards

Myweb
Disclaimer: This posting is provided "AS IS" with no warranties, and confers
no rights.

> Is it possible to change the gateway of a client PC, part of a
> workgroup, remotely from another PC that belongs to the same
> workgroup??
>



 
Reply With Quote
 
CreateWindow
Guest
Posts: n/a

 
      05-14-2007, 07:02 AM
Hi Gemat,

Yes. I wrote a VBScript for you. Need admin rights on the remote PC and
Windows XP firewall may block the RPC calls - so turn that off if its not
working (on remote machine that is).

Read in a list of remote PC's into this script and loop through them to do
more than one.
Enjoy!

' A script by CreateWindow May 2007
' http://justpageprobe.com
'
' No Copyright - free for all!
'
' Changes IP Gateway setting on
' remote Windows computers
' Can change other IP stuff too if you add them.
'
strComputer = "remotehost.yourdomain.com"
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

strGateway = Array("10.0.10.42")

For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway, strGatewaymetric)
If errGateways = 0 Then
WScript.Echo "The gateway settings are updated."
Else
WScript.Echo "Some kind of error - settings could not be changed."
End If
Next

CreateWindow
http://mymessagetaker.com
Stop using those paper phone message pads
make the computer work for you.
http://justpageprobe.com
The FREE Web page utility you always wanted.
Monitor your enterprise Web Servers.
Keep your router connected.
Email your IP to where you need it.



"Gemat - PCSC computer shop" <Gemat - PCSC computer
(E-Mail Removed)> wrote in message
news:24C8D7ED-4757-415A-AFC1-(E-Mail Removed)...
> Is it possible to change the gateway of a client PC, part of a workgroup,
> remotely from another PC that belongs to the same workgroup??



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change gateway IP remotely using netsh RayRogers Windows Networking 8 09-26-2008 03:05 AM
Cannot change default gateway address Paul_HIT Windows Networking 3 04-18-2007 04:20 PM
Windows 2003 - change password remotely Ganyovics Windows Networking 3 04-06-2006 10:15 AM
Change Linux VLAN/Gateway Routing to a Layer 3 Jacob Linux Networking 0 03-10-2006 04:13 PM
unable to change gateway address for win98 and ME =?Utf-8?B?Q2FlIENodQ==?= Windows Networking 2 06-21-2005 09:14 AM



1 2 3 4 5 6 7 8 9 10 11