Srv Posted July 2, 2007 Share Posted July 2, 2007 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 More sharing options...
Mast3rpyr0 Posted July 2, 2007 Share Posted July 2, 2007 not quite sure what requireadmin does but try not using it? My UDF's : _INetUpdateCheck() My Programs : GameLauncher vAlpha, InfoCrypt, WindowDesigner, ScreenCap, DailyRemindersPick3GeneratorBackupUtility! Other : Bored? Click Here! Link to comment Share on other sites More sharing options...
Srv Posted July 3, 2007 Author Share Posted July 3, 2007 RequireAdmin prompts for UAC in Vista and is necessary to use to elevate privileges on Vista. See "AutoIT on Windows Vista" in bundle help file. /Srv Link to comment Share on other sites More sharing options...
Srv Posted July 4, 2007 Author Share Posted July 4, 2007 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.exeelevate.cmdelevate.vbsUsage: elevate.cmd notepad.exeSo 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 VistaEven 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 More sharing options...
Srv Posted July 4, 2007 Author Share Posted July 4, 2007 Arrh! )Nevermind my above reply...It was too easy to fix.Syntax for ShellExecute:http://msdn2.microsoft.com/en-us/library/ms630455.aspxSo I edited the elevate.vbs to do this:objShell.ShellExecute strApplication, strArguments, "", "runas", 2I simply added "2" which minimizes the window as you can read in the above MS website. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now