Amen Posted March 23, 2006 Share Posted March 23, 2006 (edited) Hi here's 2 functions i use when i want my Script not to be blocked from Windows Firewall. Func FixFireWall() If Not @Compiled then return 0 RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\AuthorizedApplications\List", @ScriptFullPath, "REG_SZ", @ScriptFullPath&":*:Enabled:"&@ScriptName) RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List", @ScriptFullPath, "REG_SZ", @ScriptFullPath&":*:Enabled:"&@ScriptName) RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\AuthorizedApplications\List", @ScriptFullPath, "REG_SZ", @ScriptFullPath&":*:Enabled:"&@ScriptName) RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List", @ScriptFullPath, "REG_SZ", @ScriptFullPath&":*:Enabled:"&@ScriptName) return 1 EndFunc Func CleanFireWall() If Not @Compiled then return 0 RegDelete("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\AuthorizedApplications\List", @ScriptFullPath) RegDelete("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List", @ScriptFullPath) RegDelete("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\DomainProfile\AuthorizedApplications\List", @ScriptFullPath) RegDelete("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List", @ScriptFullPath) return 1 EndFunc sorry for warped code,paste it to your editor. aah almost forgot to say that functions do nothing if script not complied Edited March 23, 2006 by Amen Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- Link to comment Share on other sites More sharing options...
poisonkiller Posted April 24, 2006 Share Posted April 24, 2006 You could make an UDF of it. Then it would better and easier to use it in scripts. Link to comment Share on other sites More sharing options...
PerryRaptor Posted April 25, 2006 Share Posted April 25, 2006 (edited) There is a much easier way to do this on a network and a SOHO network. I do not recommend doing this for a computer that connects directly to the internet; must be at least behind a router.Use Microsoft's NetSH.exe...The WindowsXP SP-2 Home and Pro Windows Firewall command line system. Highly scriptable and includes a batchfile interface for script files as well as porting the console output.the following command sets WinXP SP-2 Firewall to allow REMOTE ADMIN allowing MMC and WMI eventsNetsh firewall set service REMOTEADMIN ENABLE SUBNETYou can DL a 1 MB instruction document from http://www.microsoft.com/downloads/details...&DisplayLang=enor, look at it yourself via Cmd prompt by typing Netsh help.I forgot the most important parts; remotely administers firewall group policies and settings on remote computers! Edited April 25, 2006 by PerryRaptor Link to comment Share on other sites More sharing options...
flaxcrack Posted June 19, 2006 Author Share Posted June 19, 2006 Netsh firewall set service REMOTEADMIN ENABLE SUBNET I don't think so Tim. [quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD() Link to comment Share on other sites More sharing options...
Olish Posted July 21, 2006 Share Posted July 21, 2006 (edited) Here is a little utility that comes in handy if you are a domain admin and need to do remote work on a remote machine where the Windows Firewall is turned on. It is nuthing special, but it works. Please note that you must have local administrator rights on the remote machine in order for this to work. Enjoy and take care! Excuse me but do you mean that the remote machine must be connected with an administrator account ?Does somone know how can I execute some executables on a remote machine without using a software like psexec ? Edited July 21, 2006 by Olish Olivier, from France.Free Wake On LAN script Link to comment Share on other sites More sharing options...
ptrex Posted July 25, 2006 Share Posted July 25, 2006 @Olish You don't need to run it on the remote machine !! Just run it on you machine specifying the remote IP address. Condition is that you have administrator rights on the remote machine to turn off/on the firewall. Thing that might help is setting the RPC port open on the remote machine. (is TCP 135). Works all fine over here. Hope it helps you going. Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Vicks Posted July 26, 2006 Share Posted July 26, 2006 hmm i can't shut off my own firewall [s]Autoit[/s] Link to comment Share on other sites More sharing options...
peter wynn Posted September 10, 2006 Share Posted September 10, 2006 what a waste of time disable the firewall via group policy fool Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 10, 2006 Moderators Share Posted September 10, 2006 what a waste of time disable the firewall via group policy foolWho's the fool, the one posting the script, the one saying they can't get something to work, or the one posting comments on a thread that's been dead for 6 weeks? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
peter wynn Posted September 16, 2006 Share Posted September 16, 2006 Who's the fool, the one posting the script, the one saying they can't get something to work, or the one posting comments on a thread that's been dead for 6 weeks?dude you just replied to my "comments on a thread that's been dead for 6 weeks" ! Looks like your an even bigger fool. This forum is for "PC world" technicians and I shall not be visiting it anymore good day to you sir. Link to comment Share on other sites More sharing options...
Vicks Posted September 16, 2006 Share Posted September 16, 2006 wow hes a noob. Smoke is right by all means and when someone bumps a thread for a lame reasons people have a right to post there thought of your newbishness [s]Autoit[/s] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 17, 2006 Moderators Share Posted September 17, 2006 dude you just replied to my "comments on a thread that's been dead for 6 weeks" ! Looks like your an even bigger fool. This forum is for "PC world" technicians and I shall not be visiting it anymore good day to you sir.Good for us, too bad for wherever you land... You can't even tell time, I posted on a topic that was dead for 15 minutes not 6 weeks (you brought that dead puppy alive). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
powerspike Posted March 16, 2007 Share Posted March 16, 2007 Good for us, too bad for wherever you land... You can't even tell time, I posted on a topic that was dead for 15 minutes not 6 weeks (you brought that dead puppy alive).maybe the soul of the darned puppy wants to run after cars again.....here's another noob trying to disable the firewall of a remote pc that he's not connected to, because the firewall is on. can this script still be used? guess its almost like a hack...but for all the right reasons... :"> Link to comment Share on other sites More sharing options...
ptrex Posted March 16, 2007 Share Posted March 16, 2007 @powerspikeMaybe this explains everything.Disable Firewall How to ?regardsptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
sshrum Posted April 10, 2007 Share Posted April 10, 2007 I work in an environment (not saying where) where firewalls are mainly off (I know, I know but I'm not the boss here). Being able to disable firewalls without having GP mod-rights would be great. We have a number of machines that don't seem to update properly with GP so I'm one of those in a situation where disabling a firewall remotely without GPs would be great (as I am a local admin...not a domain admin). We mainly do remote assistance / desktop connections to provide support so if a user's firewall is on (and disabled due to permissions), changing it remotely beats having to send a tech out to turn it off. OTOH: Let's think this in reverse...What would the reg key command be to turn a firewall ON remotely? Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Â Link to comment Share on other sites More sharing options...
Krem Posted April 11, 2007 Share Posted April 11, 2007 Hi what about this stuff ? CODEFunc SetWindowsFirewallStatus($status) If $status = 0 Then $status = FALSE ElseIf $status = 1 Then $status = True EndIf $objFirewall = ObjCreate("HNetCfg.FwMgr") $objPolicy = $objFirewall.LocalPolicy.CurrentProfile $objPolicy.FirewallEnabled = $status EndFunc If you compile it and run it with pstools that might help Link to comment Share on other sites More sharing options...
ptrex Posted April 11, 2007 Share Posted April 11, 2007 (edited) @KremRun this cammand on each client through a login script, and all you problems will be over.Needs to be done only once.netsh firewall set service REMOTEADMIN ENABLE SUBNETOf course you need admin rights to run this cmd.For remote admin sometime you need to open the RPC Port 135Enjoy !!ptrex Edited April 11, 2007 by ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Sn0opy Posted April 11, 2007 Share Posted April 11, 2007 You could add a function to remove the ballon tips too. I disabled the firewall too, but the notifications were still there. ;Disable Anti-virus Notifications [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center] "AntiVirusDisableNotify"=dword:00000001 ;Disable Firewall Notifications [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center] "FirewallDisableNotify"=dword:00000001 ;Disable Automatic Updates Notifications [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center] "UpdatesDisableNotify"=dword:00000001 Link to comment Share on other sites More sharing options...
Drakthor Posted April 11, 2007 Share Posted April 11, 2007 very cool tool imo Link to comment Share on other sites More sharing options...
hilariousajit Posted May 15, 2008 Share Posted May 15, 2008 Mr. Monkey I think we both agree!My code will enable the Remote Reg Service and then send Reg Punches to the remote machine. It makes it rather smooth I think.And Psexec is so cool...I love it.And I totally feel the same way about the money cow. They are so awesome, but it really sucks when it doesn't work the way it should, or you were lead to believe it would.i tried PSexe from workgroup, although we have domain. it dows not work . plz. send me cmd line with 'systems manager' as the target sys. 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