Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - how to set a ip and comuter name form vbscript?

Reply
 
Old 04-06-2009   #1 (permalink)
GS


 
 

how to set a ip and comuter name form vbscript?

I tried Google for answer, so far I found some rather complex script for a
lot more than I need and I still have not figure out the parts I need.


getting existing IP and computer name is easy from wmi but setting them, so
far elude me


thank you for your expertise and patience



My System SpecsSystem Spec
Old 04-06-2009   #2 (permalink)
Pegasus [MVP]


 
 

Re: how to set a ip and comuter name form vbscript?


"GS" <gsmsnews.microsoft.comGS@xxxxxx> wrote in message
news:OCCco7ttJHA.1240@xxxxxx
Quote:

>I tried Google for answer, so far I found some rather complex script for a
> lot more than I need and I still have not figure out the parts I need.
>
>
> getting existing IP and computer name is easy from wmi but setting them,
> so
> far elude me
>
>
> thank you for your expertise and patience
The usual way is to do it not from VB Script but with the netsh.exe console
command.


My System SpecsSystem Spec
Old 04-06-2009   #3 (permalink)
GS


 
 

Re: how to set a ip and comuter name form vbscript?

thanks very much, I will try later on a test pc with a netsh input file like

# ----------------------------------
# IPv4 Configuration
# ----------------------------------
pushd interface ipv4

reset
set global icmpredirects=enabled
add route prefix=0.0.0.0/0 interface="Local Area Connection"
nexthop=192.168.111.90
add route prefix=0.0.0.0/0 interface="internet" nexthop=192.168.111.1
add address name="Local Area Connection" address=192.168.111.89
add address name="internet" address=192.168.111.88


popd
# End of IPv4 configuration


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
VBScript Form Filler VB Script
How to do No hang up VBScript (nohup for VBScript) VB Script
Whats happened to my comuter Vista General
COMUTER FREEZES USING IE7 Vista General
Complete Comuter restore Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46