Skip to main content

Posts

Piping pslist or tslist to findstr

If you are are a console junkie and you frequently play around or look around what is running in your system you may find that using TaskManager can be time consuming and limiting. So I looked around and found a way to use pslist (from Windows Sysinternals) or tslist ( a built in command line ). The command below means to show information about a process running on "remote_machine" with process name of python.exe D:\><path_to_pslist>pslist.exe \\remote_machine | findstr python.exe This one is using the built in tslist command. Same as before, we want to query for a process named python.exe on "remote_machine." D:\> tslist /S remote_machine | findstr python ~ts

Powertools free software

Vitrite is a tiny utility written by me,  Ryan VanMiddlesworth , that allows you to manually adjust the level of transparency for almost any visible window. It works by utilizing a feature present in Windows 2000/XP (and all later incarnations) for variable window transparency. WinSpy++ is a handy programmer's utility which can be used to select and view the properties of any window in the system. WinSpy is based around the Spy++ utility that ships with Microsoft Visual Studio. ~ts

Windows Server 2008 64bit crashing randomly after memory upgrade

I have VMWare Server 2.0 Beta x running on Windows Server 2008 Std 64bit. At only 2GB I can only run one virtual machine. So the machine was upgraded to 8GB! I didn't notice much performance improvement in the host machine but I can start kicking in four virtual machines. But......... The big but.. was that Windows Server 2008 just crashes randomly. Sometimes just a few minutes.. booom it crashes. Digging a little further I was able to simulate the crash pretty easily. Remote the machine's console session (/admin switch in mstsc.exe) then login back to the host machine. So I was thinking/asking myself, was it because of the new 8GB memory upgrade? It must be, but is it the hardware or software that does not like the upgrade. Trying to eliminate variables, I booted the machine into System Rescue CD then run memtest for two hours. No dice here. So it must not be the new memory being faulty. Digging more, I found out that there was a video error logged in Control Panel>

Export TestPartner run into xml with xsl

TestPartner run results can be exported using command line, tpexport, or via File|Export from with TestPartner itself. Another way of exporting run results is via TestPartner.TLB automation. The beauty with TestPartner.TLB is that you can export with it the xsl. See below for the code. Option Explicit Sub TestTPResultDump() Dim t As New TPApp Dim pCount As Integer Dim p As Integer Dim sCount As Integer Dim sName As String Dim tp2 As TestPartner.TPProject2 t.Login "admin", "admin", "TestPartner_SQL", 1 pCount = t.Projects.Count For p = 1 To pCount If t.Projects.Item(p).Name = "ScratchProject" Then Debug.Print t.Projects.Item(p).Name Set tp2 = t.Projects.Item(p) Dim rc As Integer For rc = 1 To tp2.Results.Count If tp2.Results.Item(rc).Name = "scratch2" Then Debug.Print tp2.Results.Item(rc).Description

Handle popup menus manually in TestPartner

One of the areas where TestPartner 6.1.x is challenged in controlling application under test (AUT) is Popup Menus. It handles it one time but sometimes it complains that the menu is not detected but it is clearly infront of the screen. Though it is working ~80% of the time but Murphy's law has it that if anything can go wrong, it will. What I have come up so far is to handle popup menus manually. See below for the code, so far it seems to meet my needs. Option Explicit Private Declare Function SetCursorPos Lib "user32" _ (ByVal x As Long, ByVal y As Long) As Long Sub Main() 'open Windows Explorer in "My Computer" Window("Desktop Window").Attach ListView("Index=1").Select "CD Drive (E:)", tpMouseRight PopupMenuEx2 "Properties" Window("Application=Explorer.exe Classname='#32770'").Attach Button("Caption=OK").Click End Sub Private Function PopupMen

Print active application and title using pywinauto

Code snippet below shows how to get the window title and application name of the active application. That is the application on top of the z-order. Need to install pywinauto to get this to work. import pywinauto.application import pywinauto.handleprops as _handleprops import pywinauto.win32functions as _win32functions import time while 1:     hwnd = _win32functions.GetForegroundWindow()     print "Active Window title is %s"%(_handleprops.text(hwnd))     print "Application name is %s"%(pywinauto.application.process_module(_handleprops.processid(hwnd)))     time.sleep(2)    ~ts