Does anyone know if you can capture the remote screen (XP) using WMI or similar?
Does anyone know if you can capture the remote screen (XP) using WMI or similar?
Pretty sure that WMI won't but VNC does.
What are you actually wanting to do?
got a very nice program taht does it automatically over vnc if its of use.
I wanted to capture the screen via a script or command line if at all possible? Looks like its not (security issue?).
I could try the VNC method instead, can you send me a link?
Cheers!
There's a commandline utility called lsgrab which will do it if that's what you're after.
I have a batch file in my quicklaunch I can click on which will prompt me to enter a computer name and it then grabs the screenshot to a jpg and shows it me. Here's the script portion, which also needs the sleep utility from the resource kit to work properly. I've put my admin username into my shortcut to it to save some typing.
Code:@echo off REM Grab a screenshot from a remote PC REM screengrab [adminusername] [hostname] IF "%1" == "" ( SET /P varAdminUser=Enter your admin username, e.g. sahmeepee: ) ELSE ( SET varAdminUser=%1 ) IF "%2" == "" ( SET /P varHost=Enter the hostname, e.g. computer69: ) ELSE ( SET varHost=%2 ) REM make a local directory to store the images if not exist c:\screenshots\nul mkdir c:\screenshots REM if we already have an image from this PC, delete it if exist c:\screenshots\%varHost%.jpg del c:\screenshots\%varHost%.jpg REM grab the image, cd variable is current directory runas /user:canon-slade\%varAdminUser% /noprofile "\\admin-file\public\ict team\Scripts\GrabRemoteScreen\lsgrab.exe /c:%varHost% /p:c:\screenshots\" REM nasty goto loop to wait for image to be created :tryImage REM has the image been created? if exist c:\screenshots\%varHost%.jpg ( REM display the image with windows preview start rundll32.exe C:\WINDOWS\System32\shimgvw.dll,ImageView_Fullscreen c:\screenshots\%varHost%.jpg goto exitScript ) ELSE ( REM give the command a little longer to run and try again sleep -m 250 goto tryImage ) :exitScript
somabc (7th July 2008)
I have gotten this to work via c# running a remote executable. It uses some WMI to help connect to get machine info etc. But as far I know WMI can not do the screen shot itself. I am using this to create a thumbnail viewer that will show screen shot of a range of machines every couple of minutes.
I have also used lsgrab before and that is a great utility. psexec can also be used to run progams that can generate screen shots locally etc. then pipe the results back via a script.
Last edited by monkeyx; 7th July 2008 at 08:32 PM.
somabc (7th July 2008)
Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)