hi ,

can you explane what he is doing ..i need some theory regarding it
mean strDesktop = WshShell.SpecialFolders("Desktop") ,what it is doing ??as i 
guess it is creating a folder ..
set oShellLink = WshShell.CreateShortcut(strDesktop & "\Shortcut Script.lnk")  
,,,,what it is doing i am not getting..
as i did not work on it so plz give some more link 


 

script language="VBScript">
         set WshShell = WScript.CreateObject("WScript.Shell")
         strDesktop = WshShell.SpecialFolders("Desktop")
         set oShellLink = WshShell.CreateShortcut(strDesktop & "\Shortcut 
Script.lnk")
         oShellLink.TargetPath = WScript.ScriptFullName
         oShellLink.WindowStyle = 1
         oShellLink.Hotkey = "CTRL+SHIFT+F"
         oShellLink.IconLocation = "notepad.exe, 0"
         oShellLink.Description = "Shortcut Script"
         oShellLink.WorkingDirectory = strDesktop

kind regards
rahul



________________________________
From: Roman Zilber <[email protected]>
To: [email protected]
Sent: Fri, 25 June, 2010 7:50:27 AM
Subject: Re: Doubt in QTp

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


-- 
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

Reply via email to