Jump to content
Sign in to follow this  

Vista UAC on, ipconfig /release

Recommended Posts

I'm testing something and I'm forced to run with UAC on (lucky me, eh?). I'm attempting to do something simple, a dos command ipconfig /release.

Well, /release requires admin priviledges and I'm getting some we

I've tried a couple iterations of the following code. Some notes.. If I just double-click (ie don't manually run in "Admin" mode), then it appears like the script flashes up in the process explorer and doesn't really run. No file is created.

If I run it in Admin mode, I get the following error pop-up:

"<Program Name>

A referral was returned from the server."

A google search says something about creating a certificate for this program. This seems like a bit of over-kill for something so simple. Has anyone got something like this to work?

I'm running all these as compiled. I've tried to manually set Admin priviledge in properties box with same error. I've tried _RunDos and RunWait both with elevate and no elevate.

Any thoughts would be greatly appreciated.






#include <file.au3>

#include <Process.au3>

#include <IE.au3>


; $file=FileOpen("c:\rats\atest.txt",1)

; FileWriteLine($file,"Starting Test.\n")

_RunDos('elevate ipconfig /release')

;RunWait(@ComSpec & " /c " & 'elevate ipconfig /release', "", @SW_HIDE)

; FileWriteLine($file,"Starting Loop\n")


While ($count<10)

; FileWriteLine($file,"Checking for Windows exist:" & $count)

; WindowsCaptureList("UAC Check")

If WinExists ("User ", "") Then

WinActivate("User ","")

Send("{Tab 2}")



Sleep (5000)



Run(@ComSpec & " /c " & 'ipconfig /renew', "", @SW_HIDE)

; FileClose($file)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...