Script to Change IP - XP Home
Results 1 to 6 of 6

Thread: Script to Change IP - XP Home

  1. #1
    Join Date
    Dec 2002
    Location
    Lake Odessa Michigan
    Posts
    36

    Script to Change IP - XP Home

    My wife's computer runs WP Home SP2 -- I want to have different IP addresses set dependent on who logs in. I am unable to find a way to do it with XP Home. No login options for scripts are available. The netsh commands do not seem to be available either. Anyone have a notion on how I might accomplish the IP setting at login?

  2. #2
    Join Date
    Apr 2000
    Location
    Sheboygan, WI
    Posts
    53,403
    The IP address is assigned by your ISP [ you pay for the second ip number even if they allow it which a lot do not] or your router if you have one.

    I would think you would need a router and a second net card with her using the 2nd card and setting a static IP number for it.

    A heck of a lot of trouble to set up in my book.

  3. #3
    Join Date
    Feb 2001
    Location
    Adelaide, South Australia
    Posts
    6,447
    Netsh should exist in XP Home as well as XP Pro if Service Pack 2 is installed. What happens if you run one of those netsh commands at a command prompt (and what commands are you using)?

    I think a startup icon to run netsh in each user profile is probably the easiest way to do this, it's just a matter of making it work.
    Safe computing is a habit, not a toolkit.

  4. #4
    Join Date
    Dec 2002
    Location
    Lake Odessa Michigan
    Posts
    36

    Closer to Getting It To Work

    Okay -- you're right. Works from the command line. I think something isn't right with the script, however.

    From the command prompt it executes the following okay: netsh {enter} interface ip {Enter} set address ...... {Enter}

    I can't get the command to work in a script however. I have a batch file that executes "netsh exec <script filename>" -- the script file containing the "set address..." command. Something wrong with the syntax, but can't figure it out...

    Original Post:
    My wife's computer runs WP Home SP2 -- I want to have different IP addresses set dependent on who logs in. I am unable to find a way to do it with XP Home. No login options for scripts are available. The netsh commands do not seem to be available either. Anyone have a notion on how I might accomplish the IP setting at login?

    Tuttle Reply:
    Netsh should exist in XP Home as well as XP Pro if Service Pack 2 is installed. What happens if you run one of those netsh commands at a command prompt (and what commands are you using)?

    I think a startup icon to run netsh in each user profile is probably the easiest way to do this, it's just a matter of making it work.

  5. #5
    Join Date
    Dec 2002
    Location
    Lake Odessa Michigan
    Posts
    36

    It's A Permission Issue Now...

    Executing a batch file works fine -- changes the IP address as desired. The only remaining problem is that when the "Guest" account is selected, there isn't the required permission on the batch file to allow it to execute. "Runas" isn't available for batch files apparently.

    Any suggestions on how can I give it the necessary permission(s)?


    Quote Originally Posted by mreed
    Okay -- you're right. Works from the command line. I think something isn't right with the script, however.

    From the command prompt it executes the following okay: netsh {enter} interface ip {Enter} set address ...... {Enter}

    I can't get the command to work in a script however. I have a batch file that executes "netsh exec <script filename>" -- the script file containing the "set address..." command. Something wrong with the syntax, but can't figure it out...

    Original Post:
    My wife's computer runs WP Home SP2 -- I want to have different IP addresses set dependent on who logs in. I am unable to find a way to do it with XP Home. No login options for scripts are available. The netsh commands do not seem to be available either. Anyone have a notion on how I might accomplish the IP setting at login?

    Tuttle Reply:
    Netsh should exist in XP Home as well as XP Pro if Service Pack 2 is installed. What happens if you run one of those netsh commands at a command prompt (and what commands are you using)?

    I think a startup icon to run netsh in each user profile is probably the easiest way to do this, it's just a matter of making it work.

  6. #6
    Join Date
    Feb 2001
    Location
    Adelaide, South Australia
    Posts
    6,447
    What if it wasn't a batch file -- a shortcut that calls "netsh int ip set address ..." should also work, and negates the need for any separate files.

    To be honest, I'm not sure if you're going to be able to get around this using a Guest account. In Vista you can put a user in the Network Operators group, but I think in XP you need admin rights (or Power User, which is ultimately no better).

    If this was an XP Pro machine then I'd set up a startup script using Group Policy to assign the "guest" IP address, and then use the login shortcut to fix it for non-guest users. XP Home doesn't do Group Policy though.
    Safe computing is a habit, not a toolkit.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •