Control Windows with Windows PowerShell and WASP

Posted: March 17th, 2011 | Author: | Filed under: Uncategorized | 8 Comments »

Step 1: Install PowerShell
PowerShell 2.0 is included in Windows 7. If running any prior version, download and install Windows Management Framework Core from Microsoft support site http://support.microsoft.com/kb/968929

Step 2: Download Windows Automation Snapin for PowerShell at http://wasp.codeplex.com/ And Unzip WASP.zip to a Directory

Step 3: Change PowerShell Execution Policy
Go to Start->”Programs”->”Accessories”->”Windows PowerShell” Or just type “powershell” at the Run prompt.

Get the current execution policy:

 

To be able to run all scripts, including the unsigned ones (take your own risk!), change the PowerShellexecution policy from the default “Restricted” to “Unrestricted”.
To check the current execution policy, type

get-executionpolicy

at the PowerShell prompt.

To change the execution policy to “Unrestricted”, type

set-executionpolicy Unrestricted

Then do get-executionpolicy again to check that the policy has been changed

You may also read more on script signing by typing “get-help about_signing”.

Step 4: Start Windows PowerShell editor by “Start”->”Programs”-> “Accessories” ->”Windows PowerShell ISE”

Type the following text to the “Untitle1.ps1”.

Import-Module C:/install/WASP/wasp.dll

Select-Window | ft -auto

Then test it by clicking the “Run Script” button.

 


8 Comments on “Control Windows with Windows PowerShell and WASP”

  1. 1 Glenda said at 5:51 pm on December 5th, 2011:

    Hi. I find that WASP works fine with Microsoft apps such as Notepad, but I have an old program that I really need to automate some functionality in order to export data to a current format. The controls just don’t work. It brings focus to the application, so I know I’m referencing the right process, but although when I use the keyboard to enter , e it works fine, when I try to automate it with wasp (Select-window wdv32 | send-keys “%f e”) it just brings focus to the application without causing the Alt-F (or anything else) to occur. Any thoughts?

  2. 2 Gertrude said at 4:54 pm on December 13th, 2011:

    Shoot, who would have thouhgt that it was that easy?

  3. 3 Emily Bisard said at 12:12 pm on December 20th, 2011:

    Hey just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading properly. I’m not sure why but I think its a linking issue. I’ve tried it in two different web browsers and both show the same results.

  4. 4 PC said at 7:35 am on March 23rd, 2012:

    Thank you very much, this helped me figure out how to use WASP.

  5. 5 website zone said at 10:26 am on June 1st, 2012:

    Howdy, i read your blog from time to time and i own a similar one and i was just curious if you get a lot of spam responses? If so how do you reduce it, any plugin or anything you can suggest? I get so much lately it’s driving me insane so any support is very much appreciated.

  6. 6 website zone said at 1:13 pm on June 2nd, 2012:

    Hi there would you mind stating which blog platform you’re working with? I’m planning to start my own blog soon but I’m having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I’m looking for something unique. P.S My apologies for being off-topic but I had to ask!

  7. 7 admin said at 11:51 pm on June 24th, 2012:

    Yes i also get spam responses which do also drive me crazy. Unfortunately i have not not a good plugin that works well yet

  8. 8 Luigi Fulk said at 8:43 pm on July 22nd, 2012:

    I just want to mention I am all new to blogs and certainly savored you’re web page. Very likely I’m going to bookmark your blog . You absolutely have terrific article content. Thanks a bunch for sharing your blog.


Leave a Reply