The Geek Forum

  • May 14, 2024, 05:00:10 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Due to the prolific nature of these forums, poster aggression is advised.

*

Recent Forum Posts

Shout Box

Members
Stats
  • Total Posts: 129630
  • Total Topics: 7188
  • Online Today: 188
  • Online Ever: 1013
  • (January 12, 2023, 01:18:11 AM)

Author Topic: Batch and Netsh  (Read 3021 times)

parm

  • Annoying Newbie
  • *
  • Coolio Points: +0/-0
  • Offline Offline
  • Posts: 3
    • View Profile
Batch and Netsh
« on: October 25, 2005, 04:42:38 AM »

I have 1 laptop with 1 wireless PCMCIA card in it.
I have a WLAN at home (static IP adresses) and I have access to a WP2P at school (also static IP adresses).

Because Windows XP doesn't save network settings to each user, but it saves to each interface, I'm pretty screwed. I have to manually edit the network settings each time, each day.

That's not pretty cool. I browsed a bit through the MS support and I found the command NETSH.

I want to create 2 users on my laptop. One named "school" and one named "home".

In the startup folder of school I'll set a link to a batch file that'll edit my network settings automatically to the correct settings each time I log on.
Same for the account home.

Problem is I'm stuck, the script doesn't work and I want you guys to help me.


This is my script :

netsh name="Broadcom 802.11g Wireless Network Adapter" [source=]{static [addr=192.168.1.10] [mask=255.255.255.0] [gateway=192.168.1.1]}
set dns [name=Broadcom 802.11g Wireless Network Adapter] [source=]{static [addr=192.168.1.10]{195.238.2.22}} [[ddns=195.238.2.21]{enabled}] [suffix=primary]


And this is the page at ms support :
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/netsh.mspx


Thanks a lot in advance :)
Logged

jeee

  • Dork
  • ***
  • Coolio Points: +189/-4
  • Offline Offline
  • Gender: Male
  • Posts: 796
    • View Profile
Batch and Netsh
« Reply #1 on: October 25, 2005, 04:55:56 AM »

parm

  • Annoying Newbie
  • *
  • Coolio Points: +0/-0
  • Offline Offline
  • Posts: 3
    • View Profile
Batch and Netsh
« Reply #2 on: October 25, 2005, 05:22:58 AM »

Hey I only regged here to ask a question, so stop acting like you're cool and I'm just a noob. I won't introduce myself here, as I don't even want you guys to know me. I just thought this was a proper forum to ask my question, with the "geek" in the title, but I'm afraid guys like you are called irritating  :?
- edit
Wow, you really have the right to post things like that, because you're a die-hard forummer here, with your 38 posts, regged a month before me.
Logged

dcrog

  • Banned on the run
  • Hacker
  • ****
  • Coolio Points: +253/-2
  • Offline Offline
  • Posts: 1815
    • View Profile
Batch and Netsh
« Reply #3 on: October 25, 2005, 05:28:03 AM »

Logged

Old enough to know better.
Apparently not wise enough.

And who says with age come's wisdom?

parm

  • Annoying Newbie
  • *
  • Coolio Points: +0/-0
  • Offline Offline
  • Posts: 3
    • View Profile
Batch and Netsh
« Reply #4 on: October 25, 2005, 05:34:26 AM »

http://www.likeIcare.com

Ok, I get the picture. Cu, will ask this in a forum that's cooler than here, and in which I will consider to stay.
At least you could of shown some respect to me, but as in your sig : who says with age come's wisdom?

#no-life at quakenet please.
Logged

jeee

  • Dork
  • ***
  • Coolio Points: +189/-4
  • Offline Offline
  • Gender: Male
  • Posts: 796
    • View Profile
Batch and Netsh
« Reply #5 on: October 25, 2005, 06:16:22 AM »

Quote from: parm
Hey I only regged here to ask a question, so stop acting like you're cool and I'm just a noob. I won't introduce myself here, as I don't even want you guys to know me. I just thought this was a proper forum to ask my question, with the "geek" in the title, but I'm afraid guys like you are called irritating  :?
- edit
Wow, you really have the right to post things like that, because you're a die-hard forummer here, with your 38 posts, regged a month before me.


You're right, I don't have the right to post comments like that, that's why I pointed you to a similar thread so you could read what the real regulars normally answer to posts like yours.

TheJudge

  • Administrator
  • Hacker
  • *
  • Coolio Points: +330/-6
  • Offline Offline
  • Gender: Male
  • Posts: 5270
    • View Profile
Batch and Netsh
« Reply #6 on: October 25, 2005, 06:37:59 AM »

Quote from: parm
http://www.likeIcare.com

Ok, I get the picture. Cu, will ask this in a forum that's cooler than here, and in which I will consider to stay.
At least you could of shown some respect to me, but as in your sig : who says with age come's wisdom?

#no-life at quakenet please.


Quit your whining you little bitch. You made the error of asking for a service at the wrong place. It's like walking to Burger King and asking to speak with a car salesperson. People will look at you funny. So you can tell the freckled guy behind the counter he sucks, storm out, and yell that you'll go to MacDonalds to get your car instead, but you'll still look like an idiot.
Logged

Min

  • Nice Ex-Hackernetwork Moderator
  • Forum Moderator
  • Hacker
  • *
  • Coolio Points: +468/-13
  • Offline Offline
  • Gender: Female
  • Posts: 5970
  • Slacker Wiseass
    • View Profile
Batch and Netsh
« Reply #7 on: October 25, 2005, 07:46:54 AM »

Chicken parm
Logged
Flammable : Inflammable :: Duh : No Duh
"I TYPE 120 WORDS PER MINUTE, BUT IT'S IN MY OWN LANGUAGE!"  -ivan
1,180,463,441,680 Coolio Points

GenStyx

  • Computer Whore
  • **
  • Coolio Points: +2/-0
  • Offline Offline
  • Posts: 301
    • View Profile
Batch and Netsh
« Reply #8 on: October 25, 2005, 10:54:16 AM »

Quote from: Detta
Chicken parm

mmmmm chicken parm  :P

I find a good way of getting help is to shout at people I don't know before even introducing myself and then insulting them when they don't do what I want when I want it done.
Logged
Death is just another path, one that we all must take.
Jackie Treehorn treats objects like they're women, man!

MISTER MASSACRE

  • Lady Modmalade
  • Forum Moderator
  • Hacker
  • *
  • Coolio Points: +292/-17
  • Offline Offline
  • Posts: 2810
  • inhaling chalk in the old school
    • View Profile
    • twittery
Batch and Netsh
« Reply #9 on: October 25, 2005, 03:35:12 PM »

SHUT UP PARM

Edit: Can't you just disable the network connection, create a new one with the new settings, and then enable and disable the connections as necessary?
Logged

heretofore

  • Jail Bait
  • *
  • Coolio Points: +0/-0
  • Offline Offline
  • Posts: 60
    • View Profile
Batch and Netsh
« Reply #10 on: October 25, 2005, 04:43:25 PM »

Omgz you guyz he said we arent cool  :cry:

I love how everyone likes to be an entitlement whore, and sometimes I like to chat with them about their stupidity... but sadly, they just won't play along. Well done, jeee!!
Logged

OMFGWTHBBQPLZGQTHXPHDFBI!!!!!11!
llama llama cheesecake llama tablet brick potato llama. llama llama mushroom llama llama llama duck.