Jump to content

_RunDos and netsh Vista


Recommended Posts

Hi,

I'm trying to do this on a Vista box:

#RequireAdmin
#include <Process.au3>; Used by _RunDOS
$rc = _RunDOS("netsh firewall add portopening UDP 4500 ""UDP port 4500""")

Works fine on WinXP but in Vista it just doesn't dispite the fact that I'm using

#RequireAdmin

Any help is greatly appreciated!

TIA

Link to comment
Share on other sites

I found Windows Vista scritp elevation powertoys from Microsoft. Two files can be used to elevate privileges in Vista:

Download and extract: http://download.microsoft.com/download/f/d...lity2007_06.exe

elevate.cmd

elevate.vbs

Usage: elevate.cmd notepad.exe

So I thought I'd use the MS powertoy for elevating privileges...

Run(@ComSpec & " /C " & @ScriptDir & '\elevate.cmd Firewall.bat', "", @SW_HIDE); The batch file that configures Windows Firewall on XP and Vista

Even though I'm using @SW_HIDE, the Firewall.bat is not hidden. I can't seem to find the correct syntax for using "Start /MIN"

Maybe I'm just a newb ;o)

TIA

/SRV

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...