Sunday, December 18, 2005
Get control in Win Xp with command line tools and ActiveWords


Incredible effective, if you only know what to write!

Command line is not everyone`s cup of tea, some cannot remember the intricate commands, even fewer is familiar with it anymore. Some people don"t know it exist anymore. Some fear them, almost. Like a ghost. But here comes ActiveWords to the rescue! (At least if you uses ActiveWords Plus: SE cannot script in any way. )Fumbly things like turning on and off the firewall is done in a blink of an eye. At first I make a script to trigger the command line. This AW I will use in all command line actions.

1. Press "add" on the monitor bar / action bar and up pops the ActiveWords Wizard
2. Choose scripting from the list in the wizard, choose next.
3. Enter the following in the "Action" field: <"cmd.exe">
4. "Description" is very important when you search after ActiveWords, and I fill in "command line" in this field. Choose next.
5. I use the ActiveWord "dos" to easy association.

The command <" PATH "> executes the program. You must enter the entire path, such as c:/program files/opera.exe. Or use ActiveWords` special <"<ProgFilesDir>\path \program.exe"> . Some "native" programs in Windows can be started up from the Run option in the Start menu, like notepad, cmd and wordpad. All these you can apply in ActiveWords too. But if your want to use switches, always use a additional .exe ending.

BEWARE! Any spaces before a command will cause the script to "misfire"! 

The Scripting language in ACTIVEWORDS is very straight forward, and easy to compose. It`s only emulating key presses. Then the only ting you have to know, is how to press the buttons.

All the following script hereafter assumes the script above:  <dos> :

In code it will be:  <"cmd.exe"> 

Here is a heap of useful scripts, for your easy cut and paste, into the wizard scripting-guides Action-field. Assume ActiveWords at your own wish. Many of the commands have similar functions, and it could be convenient to gather them under the same ActiveWord. 

I have collected all ActiveWords concerning firewalls under "firewall" and ActiveWords then collect everyone in the same directory. All commands together at your fingertips. But it is VERY important to use the description field to describe the action.

Turn off Windows "native" firewall:
Action: <WORD:dos>netsh firewall set opmode disable<ENTER>
My word "firewall"

Turn on Windows "native" firewall:
Action: < WORD:dos>netsh firewall set opmode enable <ENTER>

Turn on Windows "native" firewall and allow port / program exceptions:
Action:
<WORD:dos>netsh firewall set opmode enable enable<ENTER>

Turn on Windows "native" firewall and do not allow port / program exceptions:
Action:
 <WORD:dos>netsh firewall set opmode enable disable<ENTER>

Add ports to the exception list:

TCP:
Action: <WORD:dos>netsh firewall add portopening TCP <INPUTBOX:TCP portnr?: Enter TCP portnr"> <INPUTBOX:Wanted Port name?: Enter name"> <ENTER>
My word "newtcp"

UDP:
Action: <WORD:dos>netsh firewall add portopening UDP <INPUTBOX:TCP portnr?: Enter Nr"> <INPUTBOX:Wanted Port name?: Enter name"> <ENTER>
My word "newudp"

LAN / Wireless

Turn on Windows "native" firewall on LAN(Local Area Connection):
Action: <WORD:dos>netsh firewall set opmode mode=ENABLE interface= "local area
connection"<ENTER>

Turn off Windows "native" firewall on LAN (Local Area Connection):
Action: <WORD:dos>netsh firewall set opmode mode=DISABLE interface= "local area connection"<ENTER>

Turn on Windows "native" firewall on wireless network: (Wireless Network Connection):
Action: <WORD:dos>netsh firewall set opmode mode=ENABLE interface= "wireless network connection"<ENTER>


Turn off Windows "native" firewall on wireless network: (Wireless Network Connection):
Action: <WORD:dos>netsh firewall set opmode mode=DISABLE interface= "wireless network connection"<ENTER>

Technorati Tags: Command line , Scripting, ActiveWords, Firewall, Wireless, LAN , Open ports, TCP , UDP.

posted by Ronald Ryland @ 12/18/2005 11:45:00 pm   0 comments
0 Comments:
Post a Comment
<< Home
 
This blawg is about ActiveWords as a supertool, to manage Windows XP, and together with other effective tools as Mindmanager and Opera. Combined with GTD, your PC is then turbocharged.
About Me

Name: Ronald Ryland
Home: Norway
About Me:
See my complete profile
Previous Post
Archives
Remember
Remember that ActiveWords "types out" the scripts. Often a single space in the wrong place can cause the script to "misfire"

Links
  • ActiveWords
  • AWesome
  • AddictiveWords in Norwegian
Powered by

Free Blogger Templates

BLOGGER