Perl System Command and Return Codes

Many of you must have used Perl as part of day to day automation. Some teams use test harnesses made exclusively of Perl. This makes it easier to leverage various functionalitiesof text manipulation, file operations and process monitoring, etc which is needed for a functional test harness. More often, system command is used to run an executable and its return code ($?) is used to compare with expected return code. Normally, a successs means value of $? is zero and failure if otherwise. This is good if you plan to write tests from scratch and team decides to go with […]

Read more

Useful WOW64 File System Trick

  On all 64-bit versions of Windows, the operating system performs a few file system and registry tricks for 32-bit applications. Essentially, operations targeting certain locations are transparently redirected to separate locations to allow applications that might not even know they’re on a 64-bit machine to interact with a more predictable environment. The functioning of 32-bit applications on 64-bit Windows is described in detail in MSDN. The short version is that when applications are looking for files into C:Program Files, they’re transparently redirected to C:Program Files (x86). The same goes for C:WindowsSystem32, which contains the 64-bit Windows binaries and is […]

Read more

How to start a process as another user from Visual Basic

This article shows you how to programmatically start a process as another user from Microsoft Visual Basic. To do this, you can use the LogonUser and CreateProcessAsUser Win32 APIs on a computer that is running Microsoft Windows NT 4.0, or you can use the CreateProcessWithLogonW Win32 API on a computer that is running Microsoft Windows 2000 or later. CreateProcessWithLogonW cannot be called from a process under the LocalSystem account. Back to the top MORE INFORMATION This article contains sample Visual Basic code that detects the version of the o… This article contains sample Visual Basic code that detects the version […]

Read more