SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Aug 2009
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to check icon on desktop

    Is there any way to check whether an icon is created in desktop after installation.
    I am trying to automate the installation process and what to check whether an icon is created after the installation is completed.

  2. #2
    Advanced Member Anshoo Arora's Avatar
    Join Date
    Oct 2007
    Location
    New Delhi, India
    Posts
    635
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to check icon on desktop

    For this, you can simply check if the '<appName>.lnk' file exists on the desktop.
    Regards,

    Anshoo Arora
    Relevant Codes

  3. #3
    Advanced Member RKY's Avatar
    Join Date
    Aug 2006
    Location
    Hyderabad, India
    Posts
    586
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to check icon on desktop


    <font class="small">Code:</font><hr /><pre>

    Pass the item name with extension.

    VerifyShortcut("Sample.exe")
    Function VerifyShortcut(ItemName)
    Set oShell = CreateObject("WScript.Shell")
    iCount = oShell.SpecialFolders.Count
    For i = 1 To iCount - 1
    sFolderName = oShell.SpecialFolders.Item(i)
    If Instr(sFolderName,"Desktop") Then
    Exit For
    End If
    Next
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    bExists = oFSO.FileExists(sFolderName &amp; "\" &amp; ItemName)
    If bExists Then
    MsgBox ItemName &amp; " shortcut created in the desktop"
    Else
    MsgBox ItemName &amp; " shortcut not created in the desktop"
    End If
    Set oFSO = Nothing
    Set oShell = Nothing
    End Function
    </pre><hr />

  4. #4
    Junior Member
    Join Date
    Aug 2009
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to check icon on desktop

    I tried to check whether QTP shorcut is present in the desktop but it says that the shortcut is not present. But i have a QTP shorcut in desktop am i doing something wrong?

    VerifyShortcut("QuickTest Professional.lnk")
    Function VerifyShortcut(ItemName)
    Set oShell = CreateObject("WScript.Shell")
    iCount = oShell.SpecialFolders.Count
    For i = 1 To iCount - 1
    sFolderName = oShell.SpecialFolders.Item(i)
    If Instr(sFolderName,"Desktop") Then
    Exit For
    End If
    Next
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    bExists = oFSO.FileExists(sFolderName &amp; "\" &amp; ItemName)
    If bExists Then
    MsgBox ItemName &amp; " shortcut created in the desktop"
    Else
    MsgBox ItemName &amp; " shortcut not created in the desktop"
    End If
    Set oFSO = Nothing
    Set oShell = Nothing
    End Function

  5. #5
    Advanced Member Anshoo Arora's Avatar
    Join Date
    Oct 2007
    Location
    New Delhi, India
    Posts
    635
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to check icon on desktop

    Hi Shameem

    I think you're searching for the ShortCut in the wrong folder. Use the folder in this reference instead:

    http://gallery.technet.microsoft.com...8-55e0771787f7


    Also, check in the following directly to see if the ShortCut exists:

    \\Documents and Settings\All Users\Desktop

    If it does, then you can use the code mentioned in the reference above.
    Regards,

    Anshoo Arora
    Relevant Codes

  6. #6
    Junior Member
    Join Date
    Aug 2009
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to check icon on desktop

    Hi Anshoo,
    It worked fine when i changed the directory.
    Thanks a lot for your help.

    Regards,
    Shameem

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:16 AM.

Copyright BetaSoft Inc.