Friday, August 1, 2008

Yes, you can script anything I - vbscript: sendkeys, stdout

What happens when you want to automate some configuration and you can't find the command line equivalent, the registry setting eludes you, and the apis to do the task seem too elaborate? Well just do it with it a few key strokes, but have vbscript do the operations for you. It's like doing a macro in excel or your favorite application.

Check out this link for the sendkeys method in wsh.

A lot times I am frustrated by trying to get Windows to act like Unix. When I want to do some string processing, it seems easier just to use vbscript and call the commandline from there. You can collect the information from stdout with the WScript.Shell object.

Check out this example.

No comments:

Post a Comment