/build/static/layout/Breadcrumb_cap_w.png

Need a VBScript, I have batch script that execute an application install which takes 30 minutes to install, at the end of this install I need to delete start menue shortcut

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

myapplocation\setup.exe

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


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: pjgeutjens 12 years ago
Red Belt
0

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.

Posted by: adilrathore 12 years ago
4th Degree Black Belt
0

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
Loop

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


Comments:
  • Thanks for the help, I didnt have to write a script, I end up using application launcher script to remove those folders. Thanks - sam42856 12 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ