haripotter’s technorati

Just another WordPress.com weblog

Executing a command on a remote windows system using WMI

Usually we use psexec tool from sysinternals to execute any program on a remote system. There is another way to execute a command on a remote windows system via WMI (Windows Management Instrumentation). This function would be beneficial to QTP automators because its a vbscript function and can be used in their function libraries (after some modifications). All you have to do is call this function with the target system name, username, password and the command to execute. The output would be the process if of the process that was initated on the target system. Have fun…

  Read more »

July 25, 2008 Posted by haripotter | HP Quality Center and QTP | , , , | 3 Comments

Download all the attachments from a specific folder in QC

There was a recent request from Salman asking how to download the folder contents from QC. I’m assuming he meant to download all the attachments from a specific folder in QC. I tweaked my earlier function  to download all the files instead of specific file. Here is the function.. Enjoy.
Read more »

July 18, 2008 Posted by haripotter | HP Quality Center and QTP | , , | 2 Comments

Vbscript to revert a ESX Virtual machine snapshot

First of all, let me clarify that the snapshot restore is completely done by the VMWARE perl toolkit. But there may be instances where you cannot remember this long command to revert a virtual machine snapshot. You could create a vbscript function that will help you out with a much easier syntax . All you’ll need is the esx host name where the virtual machine is registered to, the login credentials to the esx host and the virtual machine name. Another advantage is you could use this from QTP to automate the vm snapshot restore process.
Read more »

July 16, 2008 Posted by haripotter | HP Quality Center and QTP, Virtualization | , , , , | No Comments Yet

Determine the mapped drives on QTP Client

You can use WMI Class Win32_LogicalDisk to find that out. With this class not only can we determine which drives are mapped to network shares, but we can also determine which network shares they map to. Please note that the DriveType equal to 4 represents a mapped network drive. For more details about Drivetype values, refer the WMI SDK. The WMI query returns a collection of mapped drives. DeviceID, which returns the drive letter for the drive; and ProviderName, which returns the network share the drive is mapped to .
Read more »

July 2, 2008 Posted by haripotter | HP Quality Center and QTP | , , , | No Comments Yet