title: how to delete multiple folders,desktop and start menu shortcut using vbscript
body: <p>I never did any vbscript before, so i don't know if my question is very easy one. Following is the flow of steps that has to be done :</p>
  
  <p>Check if exist and delete a folder at c:\test1 if found and continue. If not found continue.
  Check if exist and delete a folder at c:\programfiles\test2 if found and continue. If not found continue.
  Check if a desktop shortcut and start menu shortcut exist and delete if found. If not exit.</p>
  
  <p>I could delete 2 folders with the following code:</p>
  
  <pre><code>strPath1 = "C:\test1"
  strPath1 = "C:\test1"
  DeleteFolder strPath1
  DeleteFolder strPath1
  Function DeleteFolder(strFolderPath1)
  Dim objFSO, objFolder
  Set objFSO = CreateObject ("Scripting.FileSystemObject")
  If objFSO.FolderExists(strFolderPath) Then
      objFSO.DeleteFolder strFolderPath, True
  End If
  Set objFSO = Nothing
  </code></pre>
  
  <p>But i need to run one script to delete 2 folders in different paths, 2 shortcuts one in start menu and one on desktop.</p>
  
  <p>I was experimenting with this code to delete the shortcut on my desktop:</p>
  
  <pre><code>Dim WSHShell, DesktopPath
     Set WSHShell = WScript.CreateObject("WScript.Shell")
     DesktopPath = WSHShell.SpecialFolders("Desktop")
     on error resume next
     Icon = DesktopPath &amp; "\sample.txt"
     Set fs = CreateObject("Scripting.FileSystemObject")
     Set A = fs.GetFile(Icon)
     A.Delete
     WScript.Quit
  </code></pre>
  
  <p>It works fine for txt file on desktop, but how do i delete a shortcut for an application from desktop as well as start menu.</p>