Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Setting Static IP config for different user profiles?  (Read 570 times)

0 Members and 1 Guest are viewing this topic.

DaveLembke

    Topic Starter


    Sage
  • Inventor of the Magna-Broom 3000 =)
  • Thanked: 596
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Setting Static IP config for different user profiles?
« on: January 06, 2018, 08:44:26 AM »
Curious if anyone knows of a trick to set up Windows to use a different Static IP based on which profile you login under for Windows 7 64-bit?

Currently each time I connect to other networks under a Static IP I have to manually change it each time. So I was thinking maybe there is a trick that can be saved in a user profile so that depending on which user account I logon as it assumes a specific static IP address specific to just that user account.

Maybe I need to add something to the startup for each profile, but I was digging for a method via command shell in which I could run a batch or power shell from startup specific to each user profile, but not finding a solution. So figured I'd check here in case others have come across a method of doing this.

Maybe it requires a regedit script on startup to change registry values on logon of each account and I just need to construct something myself that does that. However I am thinking there might be a race condition in which the profile loading might load the prior registry value and then the value changes in the registry but of which the value is the prior value maybe vs the latest IP address for that account.  :-\ When modifying the registry I've never tested on the fly to see if it affects the profile immediately or having to log out and back on to work.

One method that I know would work but its a real rube goldberg method would be to record the process of changing the IP address and compile that to EXE and then add that to the start up for the user profile in which the system is loading the profile and then the EXE triggers and then the mouse and keyboard automated go and do this process and then its done, but thats a rube goldberg method and if there is a better method then I'd like to do it through a script etc vs a automation macro on loading of the user profile. The macro automation method might be like taking a sledge hammer to a thumbtack.  ;D

TheWaffle



    Hopeful
  • Thanked: 3
    • Experience: Beginner
    • OS: Linux variant
    Re: Setting Static IP config for different user profiles?
    « Reply #1 on: January 06, 2018, 10:27:41 PM »
    Quote
    Maybe I need to add something to the startup for each profile, but I was digging for a method via command shell in which I could run a batch or power shell from startup specific to each user profile, but not finding a solution. So figured I'd check here in case others have come across a method of doing this.

    http://techgenix.com/configurestaticipwiththenetshcommand-lineutility/
    I have verified this works in Windows 10 Pro x64 1709.  I do not have a Windows 7 VM.

    Quote
    Maybe it requires a regedit script on startup to change registry values on logon of each account and I just need to construct something myself that does that.

    If I recall correctly nirsoft had a tool to add, edit and remove startup programs.  I believe a batch file could be ran as a start up program.  If the computer is logged into more than one account at a time, it may be problematic.

    It is also possible to assign multiple ip's to a single interface, after setting up the first address to set up more look under advanced.  (See attached image.)  This feature has been in Windows since at least the XP days, so it is very likely it is also in W7.



    [attachment deleted by admin to conserve space]