Hi Everyone, I need help creating a vbscript that remvoes the shortcuts folders from "%ALLUSERSPROFILE%\StartM~1\Programs\lotusn~1" after they are created or untill the install process is done. I have tried my batch script with start /wait of my install doesnt work. So if I have a VBScript that looks for the runing process or monitor when these shortcuts are created will work. Here is my batch file


IF EXIST "%ALLUSERSPROFILE%\StartM~1\Programs\lotusn~1 rmdir" "%ALLUSERSPROFILE%\StartM~1\Programs\lotusn~1" /s /q
IF EXIST "%ALLUSERSPROFILE%\StartM~1\Programs\lotusm~1 rmdir" "%ALLUSERSPROFILE%\StartM~1\Programs\lotusm~1" /s /q

Answer Summary:
0 Comments   [ + ] Show Comments


Please log in to comment



first of all, have you checked if your setup might contain an MSI? It would be alot easier to get rid of the shortcuts menu.

I suspect the setup.exe only launches another installer and exits, which is why start /wait does not work.

Answered 05/16/2012 by: pjgeutjens
Red Belt

Please log in to comment

If you are creating a vbscript this has to be tricky you need to loop sleep counter till the folder is deleted as shown in the below snippet:

Dim counter

counter = 0

Do While fso.FolderExists(DelFoldername) And counter < 10
WScript.Sleep 1000
counter = counter + 1

If fso.FolderExists(DelFolderName) Then
' Write a failure message.
End If

Answered 05/16/2012 by: adilrathore
Fourth Degree Black Belt

  • Thanks for the help, I didnt have to write a script, I end up using application launcher script to remove those folders. Thanks
Please log in to comment
Answer this question or Comment on this question for clarity