Programmat​ically changing the TCP/IP address of Windows Vista / 7 / 8

Hi there!
I'm pretty new to LabVIEW (started 2 months ago) and still have a long way ahead of me, so please forgive me if anything that I ask is too basic.
I'm trying to change the IP properties of the PC via LabVIEW for some bigger software I'm working on.
I can easily do it in Windows XP using the System Exec function to call cmd.exe and then use netsh commands, as previously explained for example here:
https://forums.ni.com/t5/LabVIEW/Programmatically-​changing-the-IP-address-of-Win-XP/m-p/410533/highl​...
https://forums.ni.com/t5/LabVIEW/Change-IP-number-​and-Subnet-mask-with-LabView/m-p/407536/highlight/​...
http://forums.ni.com/t5/LabVIEW/How-to-change-the-​TCP-IP-settings-of-the-LAN-connection-from-LV/m-p/​...
http://forums.ni.com/t5/LabVIEW/Change-the-compute​r-IP-address-in-LabVIEW/m-p/167481?query.id=108803​... ...
But then, since I want to run my software in Windows 7 (& by extension to any Windows OS), I have a problem: netsh asks for elevated rights.
So, the next problem is: how do I run cmd.exe (or any other programm?, by extension) as administrator (from LabVIEW)?. Note that I'm using an account with admin rights. But I would prefer not having to disable the User Account Control configuration, and I don't want to force the user to any interaction (clicking in pop-ups, or right-clicking in anything), I want it to be as automatized as possible.
I did a bit of research and couldn't find anyway to do it, neither any command to run with cmd, so the two similar solutions that came to my mind are very rudimentary and kind of dirty:
Use DLLs to make LabVIEW press the keys necessary to open cmd running as admin via key shortcuts (using a variation of https://decibel.ni.com/content/docs/DOC-29563 and the key shortcuts from here: http://www.howtogeek.com/howto/windows-vista/run-a​-command-as-administrator-from-the-windows-vista-r​...). Here, I open the Window menu (with LWIN), properly writes "cmd", and then uses CTRL+SHIFT+ENTER ok... but then the User Account Control appears and LabView keeps doing the commands (I want ALT+Y or LEFT & then ENTER)... without affecting to the UAC! If I make LabVIEW wait a bit and manually close the UAC I succesfully have the command prompt... but LabVIEW is still incapable of write the text that I'm giving it to him (the netsh commands). LabVIEW runs the software, but it's like the UAC & the command prompt are running in a higher? level and are not affected by LV. If I do the same over a .txt I succesfuly have the intended text. Any ideas about this?
Create a link to cmd.exe and change the properties to "Run as administrator", then use System Exec to call the link, expecting to open a command prompt with elevated rights, and then write the netsh commands either with DLLs (that might not work according to my first solution) or using the "standard input" of System Exec? (not sure if this is possible). But then System Exec gives me an error (code 2) when trying to execute the .lnk and so the command prompt does not open. The error code stands for "Error 2 occurred at an unidentified location. Possible reason(s): LabVIEW: Memory is full." Any idea about how to solve this?
The conclusion is that I'm stuck with two possible solutions none of them working.
Maybe there's a more simple solution that I didn't think about?
Solutions to these problems?
Any different proposals?
Thanks in advance for any tip or help!
Note: I titled the thread as Windows Vista, 7 & 8 since I assume all of them asks for admin rights when changing IPs. In case there are other people with the same problem, altough right now I'm only using XP & 7.
Alejandro Asensio, CLAD

First question: Why do you have to change OS properties via a custom application? I know such requirements can exist (sigh...) but nevertheless it seems a little bit weird to me ;-)
OK, now an idea:
Run cmd.exe via task scheduler. Here is a how to do it: http://maximumpcguides.com/windows-vista/run-a-pro​gram-with-administrative-privileges-without-uac-pr​...

Similar Messages

  • I-tunes not kompatibel with Windows 8. Every time I want to load my Ipod or Iphone I have to change the compability to, for instance windows vista. Otherwise Itunes refuse to recognize my Ipad/phone. Can I expect that Itunes will "fix" this problem? Carin

    I have problems with I-tunes and the compability with windows 8. Every time I whant to load my Ipod/Iphone Itunes doesn´t recognize the pod/phone. If I change the compability to for instance windows vista it works ok.
    I guess that I need some update of Itunes?
    carin

    Hey carin205,
    I would run through the troubleshooting steps in the following article:
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/TS1538
    Welcome to Apple Support Communities!
    Regards,
    Delgadoh

  • Programmat​ically change the modified date of a folder

    Is there a way to programmatically change the last modified date of a folder?  The OpenG file info VI doesn't seem to work for a folder.
    Jim
    LV 2013
    Solved!
    Go to Solution.

    Please don't take this as criticism.  Often users will post in multiple locations and get varying levels of help from each place they posted.  This makes for a fragmented discussion where one group of individuals aren't collaborating with a separate group of individuals who are working on the same problem.  Posting in both places is fine, but I think what helps is having a link from one post to the other, so that individuals in one group can see the discussion taking place in the other.  This helps avoiding suggesting the same solution twice, and help come up with solutions neither group has come up with yet.
    At first glance the two posts looked similar enough that I thought this would be the case where the two groups can at least see the discussion taking place elsewhere.  If the two posts aren't related at all then I apologize for providing the link between them.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Programmat​ically change the IAK on the fieldpoint controller​.

    Inside a g-based program.

    Rascal,
    If you are referring to changing the IAK file programmatically on the host see the following Knowledge Base:
    http://digital.ni.com/public.nsf/websearch/AD7E2B9​7C60086B886256DDE006FBED2?OpenDocument
    Changing the item names that are downloaded on to the controller is not supported, but here is a possible solution (untested):
    1. Download the item names to your controller.
    2. FTP to the controller and then change the name of the following file: ftp:///NI-RT/SYSTEM/fpbank.ini. This is the file that holds the I/O modules names.
    3. Repeat the previous two steps until you download several different sets of item names to the controller.
    4. When you want to switch which configuration you are using just use the file I/O VIs to ch
    ange the name of the item name file to fpbank.ini.
    5. You may have to restart the controller before the new item names are valid.
    As I said this is completely untested and unsupported, but a possible solution to want it seems you want to do.
    On a side note you should try to be a little less harsh to people who are just trying to help you out.
    Ames
    Applications Engineering
    National Instruments

  • Changing the TCP port on async ports in Cisco router

    Hello,
    My goal is to replace old terminal servers from a factory environment.
    These terminal servers act as a aggregation point of terminal equipment (printers and factory automation).
    Software used in this factory writes to these devices using ip-address of the terminal server and TCP-port starting at 10001, where the last number is a port number.
    The problem is that in Cisco equipment, I can not find a way to change the tcp port to this 1000x. The only option would be to change the softwares TCP-port to Cisco default 200x, but this is not the solution I am looking for. This is because the switchover should be done when the machines are running, and the time window is to short to make changes in the factory software.
    Is there a way to change the logical TCP-port for Cisco routers asyncronous lines (HWIC-16A) to 10001-16?
    Marko Tuhkunen 

    So i figured out that i can use the archive tar /create command:
    To copy the entire flash towards TFTP:
    archive tar /create tftp://X.X.X.X/flash.tar flash:
    Now i will have to insert the new flash and probably format it first towards the correct file systems. Then i will have to use the next archive command:
    archive tar /xtract "Here i am unsure of the syntax, i want to be copying and extracting the tar I backed up from the old flash"
    After these steps are complete can i just reboot the router with the new flash card, won't there be any issues, since the startup config is on the NVRAM it will load the config properly, and i haven't seen any boot parameters but they shouldn't pose any issues since i'm not changing the flash slot.
    Thanks for your assistance

  • For FaceTime, can you add an additional e-mail that is not your Apple ID e-mail?  Everytime I try to do this on my iPad it sends me a verification e-mail saying I am trying to change the e-mail address associated with my apple ID and wants me to verify.

    I am trying to add another e-mail address to FaceTime, but do not want to change the e-mail address associated with my Apple ID.  Everytime I try to add the e-mail address in my FaceTime settings, it send me a verification e-mail asking me to verify that I want to change to this new e-mail address for my apple ID.  I do not.  I just want to have an additional e-mail address for people to contact me via FaceTime. Does anyone know how to do this?

    You can have multiple addresses associated with your apple id. You will have to verify any changes before they can be added and this is done by sending you an email. This is to protect you from someone else makeing changes to your account.
    You can make any changes and view all your info here:
    My Apple ID
    https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/

  • I have updated my iphone 5s to iOS8 but it has my old icloud account, how can i change the icloud email address as i can not get passed this page?? please help :-(

    i have updated my iphone 5s to iOS8 but it has my old icloud account, how can i change the icloud email address as i can not get passed this page??
    I do not know the log in details and no longer have that icloud email address !!
    please help :-(

    That's Activation Lock. You will need to remember the Apple ID and password you used to set up the phone.
    If you can't remember them, you can go to iforgot.apple.com to try to recover the information.
    If you are the original owner of the phone & have proof of purchase, you can try calling Apple to see if they can assist also.
    ~Lyssa

  • I have read the help info, but I can't find how to change the default email address, to the one that is my adobe I'd?

    I have read the help info, but I can't find how to change the default email address, to the one that is my adobe I'd?

    Adobe Reader for iOS doesn't set the default email address when you email a PDF.
    It's found in the Settings app:
    Settings > Mail, Contacts, Calendars > Mail > Default Account

  • After my company changed the e-mail address, I had to change my Apple-ID. How do I update my purchased Apps after the change?

    The renamed Apple ID does not update all the Apps but comes up with the old AppleID, but that ID is not there anymore and neither the old or the new password is working
    On the FAQ pages I just find a long list of Apps, stores tc. that I have to update, but no explanation on how to do that.
    I do not want to buy all the apps again just because I had to change the e-mail address and because of that the AppleID.
    It is ok to remove the free ones and load them again, but the paid one?
    How is Apple handling such things?

    OK, after reading other and similar threads too, I found a solution myself.
    Thought to share it.
    On my iPhone, after the change was made at the AppleID site, I had to logoff from the old AppleID and then to relogon with the new/changed one. After that I could update all apps again

  • Is it possible to change the "From Email Address in workflow"

    I have a created a task list and set a workflow for the list.
    Workflow Actions:
    1. Send a Email to the "Assigned To" user whenever a task is created.
    2. If the Task is due, send an reminder Email and even if its not completed, send a Email to the higher Management.
    Workflow is working fine.
    Issue:
    The Email from address is the Email Address that has been entered in the SharePoint central admin Outgoing Email address.
    I would need the from address to be of whomever has assigned the task to the particular person.
    Let me know if its possible?

    Hi Alex,
    According to your description, my understanding is that you want to change the From email address in workflows.
    The from address is set in the outgoing e-mail settings in Central Administration.
     There is no OOB way to change it in workflows.
    As a workaround, I suggest you develop your own workflow activity to do it.
    Or, there is a CodePlex solution, it contains a Send Email Extended action which allows you to specify the sender, you can take a look at:
    http://spdactivities.codeplex.com/
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • I can't seem to sync my calendar on my iphone to iCal because the default email address associated with my calendar on my iphone was to an old work email address that I no longer have.

    I can't seem to sync my calendar on my iphone to iCal because the default email address associated with my calendar on my iphone was to an old work email address that I no longer have. When I go to ICal it asks for the username and password which I no longer have. The calendar is still on my phone (even though the email account is on my phone but doesn't work) Is there a way to copy my calendar to a different email address on my iphone? I have now set the default email account for the calendar to a current email address but I still can't figure out how to merge my iphone calendars, copy the iphone calendar to iCal, or save my iphone calendar to my mac. Also, I read in ITunes to check "sync to ICal" but my  ITunes under my iphone and info just says "Sync Calendars" which doesn't transfer it to iCal when I sync my phone.

    iCloud: Troubleshooting iCloud Calendar
    iCloud: Advanced Calendar and iCal troubleshooting

  • HT201342 In Apple Mail, how do I change the default outgoing address for mailboxes that I've set up?

    In Apple Mail (Yosemite on a MacBook Pro), the default address for outgoing messages from mailboxes that I've set up that are *not* tied to separate email accounts has suddenly become my iCloud address (which I almost never use). I've got my default set to use whatever address is the default for the mailbox I'm in. This works fine for mailboxes associated with different mail accounts, and until recently it worked fine for mailboxes that I had set up for convenience, using my default email address (which is an Earthlink address I've had for many years). Somewhere within the last year, perhaps with an upgrade to the OS, I've found that outgoing mail from one of those mailboxes (but not from the general Inbox) defaults to my iCloud address. I have to manually choose a different address each time (which is hard to remember to do). This is new behavior, and very unwelcome. But I can see no way to change the default email address associated with each mailbox.
    How do I undo this unwanted connection?

    Hi everyone
    Sorry however I'm experiencing a similiar issue, in that I have 10 differing email accounts.
    However in the default email accounts, for some bizarre reason, only 4 show, being icloud, one of my older yahoo email accounts, my work email and then "From My PC".
    I run two other businesses of which I have a proper Google Mail Business Accountsfor each, but non of my google email address show in the default list.
    Is there any reason why?
    I actually want one of those to show.
    I have put my google mail to the top of the inbox, however it still doesn't show?
    I've also put the default calendar as my google business account but still the default account doesn't display.
    Any ideas?
    Jonathan

  • TS1314 How do you change the default location address (in My Pictures) of the IPOD Photo Cache ?

    How do you change the default location address (in my pictures) of the IPOD Photo Cache ?

    You do no specifically. It sounds like you are syncing a folder to the iPod. In that case:
    From a Folder on Mac OS X, Windows XP, Windows Vista, or Windows 7
    The iPod Photo Cache will be located in the folder you selected to sync with. 
    Thus, you have to change the location of the folder you sync with.

  • WRT54G router IP address is the same as my modem's IP address. how to change the routers IP address?

    The broadband modem got broken and the ISP changed it to a new modem. Now my problem is I cannot use the router when they changed the modem. The ISP won't provide support since they didn't provide me with the wireless router. I've read through the forum and found that I had to change my router's IP address. WRT54G router IP address is the same as my modem's IP address, 192.168.1.1. I already changed the local IP address of the router to 192.168.1.2, saved the setting, released and renew the ip address. Now, when I connected my internet modem cable to the router, I cannot connect to the internet. I am able to ping 192.168.1.2 but I cannot connect to the ping 192.168.1.1. Please help me do the proper setup.
    Thanks!

    Hello! I solved my problem but I find the solution so weird. After changing the routers IP address to 192.168.1.2, instead of plugging the modem cable on the Internet port of the router, I plugged it in one of the WAN ports. Presto, it worked. Even my wireless connection is also working.

  • How to change the dynamic IP address to Static IP Address in Solaris 10X86

    Hi,
    I have installed Solaris 10X86 in a VM.While installing Solaris I have enabled DHCP.So its created with dynamic IP Address.Now I want to change the dynamic IP address to static IP address.Please anyone can help me to sort out this problem.

    Hi,
    I have installed Solaris 10X86 in a VM.While installing Solaris I have enabled DHCP.So its created with dynamic IP Address.Now I want to change the dynamic IP address to static IP address.Please anyone can help me to sort out this problem.

Maybe you are looking for