Batch files with Admin privlege Vista

mtroxmtrox Minnesota
edited September 2009 in Science & Tech
Since Vista "helpfully" hides the repair function for NIC cards, I need to make a batch file to just release and renew on a particular user's laptop. Is there a good way to elevate permissions so a batch file can do this? I've wasted a half hour on this and somebody here knows the answer.

Comments

  • kryystkryyst Ontario, Canada
    edited September 2009
    do you mean so you can do it or so that the user can just click on the batch file and have it done for them?

    If it's the later, then no there's no way you can really do that with a batch file. I mean you could do a batch file with the command
    runas /user:administrator@company.com "ipconfig /release"

    You could then also put in the password into the batch file for them. But that's not really a good idea.

    The alternative is to use a program called AutoIT and create a script that runs it with elevated privileges, then compile the script into an executable. It would do the same thing, only they wouldn't be able to disect it easily to view the password.
  • mtroxmtrox Minnesota
    edited September 2009
    Yea kryyst I mean so the user can do it herself. I've got some DHCP problems with the WAP54G she connects through, and she always has to release/renew after she first hooks up. Otherwise, she's left with the IP address of her last connection.

    I'm sure AutoIT's the way, but its not worth all that for this little problem. Or.....I could just UPGRADE her to XP so all she has to do is right click the wireless, then left click repair.

    Wanna hear me p--s and moan about Vista again?
  • SnarkasmSnarkasm Madison, WI Icrontian
    edited September 2009
    When you run "diagnose and repair" on Vista, if it can't figure out what was going on, it resets the adapter and does a release and renew. What exactly is hidden?
  • mtroxmtrox Minnesota
    edited September 2009
    It takes about 3 times as long as a simple repair. And depending on what the screen says at the end of the "diagnose" part, the user has to make a choice. This user, like many, needs a recipe. I don't want it to diagnose, I just want to release and renew.
  • RyderRyder Kalamazoo, Mi Icrontian
    edited September 2009
    There is no way to right click the batch file and select "Run as admin" with a checkbox.. like in 7?

    Thus every time the batch file if run, it is elevated.
  • mtroxmtrox Minnesota
    edited September 2009
    Yea, you can. I just thought there would be a batch command that did it.
  • kryystkryyst Ontario, Canada
    edited September 2009
    Is this only happening with her or other people connecting to the WAP as well?
  • mtroxmtrox Minnesota
    edited September 2009
    Others, including my ThinkPad. It's a Linksys WAP connected to a Comcast SMC cable modem pumping out DHCP. I've just had too much to do there to diagnose it.

    Got any ideas kryyst?
  • kryystkryyst Ontario, Canada
    edited September 2009
    if it's a WAP it shouldn't be handing out DHCP at all, that's the job of the router, which in this case is your modem. The WAP should be working in AP Mode only. The WAP should facilitate the WiFI connection and pass the info from the router, no different then connecting through a lan cable essentially.

    Are sure it's a WAP54G and not a WRT54G? Also make sure that it's got the latest firmware and perhaps try doing a factory reset. Also if you haven't connect the WAP to the router with a static IP and not through DHCP. There's really not much else to configure, they are pretty dumb.
  • mtroxmtrox Minnesota
    edited September 2009
    When I said "pumping out DHCP" I meant the router, not the AP. And yea, it's a WAP54G so there is no DHCP, it's in AP mode and has a static IP outside the scope. It has the latest firmware......haven't reset it to factory. Might try that if I get some time when I'm there tomorrrow.
Sign In or Register to comment.