http://msdn.microsoft.com/en-us/library/aew9yb99%28VS.85%29.aspx
look on the "Methods" section On Thu, Jun 24, 2010 at 10:53 PM, rahul bansal <[email protected]> wrote: > Hi to all, > > I am running this scripts and running perfect,But i am not getting what it > is doing, i have mainly doubt on red marked area, as i never worked on shell > object ,so i need some information of it. > > > > > Dim oShell, oFSO > Set oShell = CreateObject("WScript.Shell") > Set oFSO = CreateObject ("Scripting.FileSystemObject") > 'Install Visual C++ Run-time Component 2008 > On Error Resume Next > s=oShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3C3D696B-0DB7-3C6D-A356-3DB8CE541918}\DisplayVersion") > If Err.Number = 0 Then > Reports.Report "Warning",Environment("TestName"),"Checking if Visual C++ > Run-time 2008 is already installed.","Visual C++ Run-time 2008 was already > installed.","Continue with HPACSP Prerequisite install." > Else > Reports.Report "Pass",Environment("TestName"),"Checking if Visual C++ > Run-time 2008 is already installed.","Visual C++ Run-time 2008 was not yet > installed.","Begining install of Visual C++ Run-time 2008" > PC.Application.CMD.ExecAndReadCommand """" & sGlobal_AutoPath & > "Software\Microsoft\C++Redist2008\vcredist_x86.exe"" /q, 1, true" > Wait 5 > On Error Resume Next > s=oShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3C3D696B-0DB7-3C6D-A356-3DB8CE541918}\DisplayVersion") > If Err.Number = 0 Then > Reports.Report "Pass",Environment("TestName"),"Checking if Visual C++ > Run-time 2008 was successfully installed.","Visual C++ Run-time 2008 was > successfully installed.","Continue with HPACSP Prerequisite install." > Else > Reports.Report "Fail",Environment("TestName"),"Checking if Visual C++ > Run-time 2008 was successfully installed.","Visual C++ Run-time 2008 was not > successfully installed.","Manual installation of the Visual C++ Run-time > 2008 is required." > End If > On Error GoTo 0 > End If > On Error GoTo 0 > > > Thanks in advanced > > Kind regards > rahul bansal > > -- > You received this message because you are subscribed to the Google > "QTP - HP Quick Test Professional - Automated Software Testing" > group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/MercuryQTP?hl=en -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en
