dbraner Posted February 7, 2010 Share Posted February 7, 2010 (edited) Hi all, the windows powershell is installed with Windows 7 by default. For older Windows versions it can be downloaded from Microsoft for free. To start powershell in Windows 7 simply type in "powershell" in the search field of the start menu. Here is a short example how DVBViewer can be controlled by powershell: $MyDVB = new-object -comobject "DVBViewerServer.DVBViewer" $MyDVB.SendCommand(42) The example above will start DVBViewer and activate channel 2 (actionid = 42). There should be no blank between SendCommand and "(42)". The command fails if DVBViewer is already running. EDIT: Accessing an already running DVBViewer: $MyDVB = [System.Runtime.InteropServices.Marshal]::GetActiveObject("DVBViewerServer.DVBViewer") You can get a listing of all methods and properties of the $MyDVB object with the command: $MyDVB | get-Member For further operations see the DVBViewer COM interface documentation. It should be possible to use events too, have to test this. Edited February 7, 2010 by dbraner Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.