Control Windows with Windows PowerShell and WASP
Posted: March 17th, 2011 | Author: admin | 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.
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?
Shoot, who would have thouhgt that it was that easy?
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.
Thank you very much, this helped me figure out how to use WASP.
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.
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!
Yes i also get spam responses which do also drive me crazy. Unfortunately i have not not a good plugin that works well yet
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.