• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1580
  • Last Modified:

How to force silently a batch Script to start only after the fisrt one is finished

In my company I would like to use SMS to push a script to uninstall the old antivirus (Trend Micro) and as soon as it is uninstalled install the new antivirus.
I created two small scripts: the first one uninstall the old antivirus, and the second one install the new one. I tried them as .bat files and they are working fine.
The second thing I would like the all process to be silent, so the user won't notice.

Script 1:
@echo off
"c:\Program Files\Trend Micro\OfficeScan Client\NTRmv.exe"

Script 2:
@echo off

How can I in one script include those 2 small scripts, so it's like the second one starts as soon as the first one is uninstalled, and the all process is silent.
So I can push it to my clients using SMS.

"Somebody suggested me /wait after the first script but that didn't work."

Thanks for your help.
  • 2
1 Solution
I had similar case when I had to uninstall Antivirus then install new one using SMS.
In SMS I created package that contains 2 programs 1  "Uninstall old One", 2  "Install New One"
In the second program I used "Run another program first" option and selected the First program, as the program that SMS   has to run before executing second one.
This was worked perfect, because SMS will not attempt to install New Program is uninstall fails and I got better reporting.

I hope this helps.
divichAuthor Commented:
Thanks Magadu, that really helps.
Would you know how to run these Uninstall and Install silently?
I don't want the users to notice that something is going on.
Unfortunately I am not familiar with Trend Micro, but I found this article that may help you to uninstall it unattended.

In SMS when you create the program in General tab Set  "Run" to "Hidden" then  checkmark  "Suppress program notification" in Advanced Tab this will hide these programs from the user.

P.S. In most cases running "Setup.exe /?" (install executables name)  shows me parameters for silent install. Usually it's /Q or /S or /Silent  ... or so on.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now