To run your command with this method, type one of the following:
RUNAS /NOPROFILE /USER:computername/username "IPCONFIG /FLUSHDNS"
RUNAS /PROFILE /ENV /USER:domain/username "IPCONFIG /FLUSHDNS"
RUNAS /ENV /USER:username@domain "IPCONFIG /FLUSHDNS"
Replace "computername", "username", and/or "domain" with the appropriate information. The problem with these methods are that they require an Administrator password, which I haven't been able to figure out on my machine. If it is anything like linux however, it is a randomly generated hash hidden by the system. Another method you can try is:
32-bit:
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V "%HOMEDRIVE%\WINDOWS\System32\ipconfig.exe" /D RUNASADMIN
64-bit:
REG ADD "HKLM\SOFTWARE\WOW6432\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V "%HOMEDRIVE%\WINDOWS\System32\ipconfig.exe" /D RUNASADMIN
This method will add the program into the registry so it runs with administrator rights every time it launches (compatibility mode). This method only works as long as your directory does not change. You must supply the direct path to the program in your registry. You could then script to look something like:
@ECHO OFF
CD \
REG ADD "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /V "%HOMEDRIVE%\WINDOWS\System32\ipconfig.exe" /D RUNASADMIN
IPCONFIG /FLUSHDNS
PAUSE>NUL
I hope this helps you out some. You can check out Verboon for more information on that REG ADD command and compatibility mode.