Solved

Skip .bat installation if present

Posted on 2011-03-09
4
417 Views
Last Modified: 2012-05-11
I am planning to run a silent installation on my clients, using a .bat login script. How can I prevent the installation to start over the next time they log in? I of course can't remove the bat file before I am pretty sure it has been installed everywhere. I add this to my script:

@echo off
msiexec /qn /i "\\10.218.110.21\Setup_Addin\Mailbox Central Outlook Addin.msi"
0
Comment
Question by:happyhenrik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Accepted Solution

by:
gavsmith earned 400 total points
ID: 35082703
Find one of the files that you know the install puts onto the computer. Then add:

@echo off
if exist "%systemdrive%\Program Files\Mailbox Central Outlook Addin\Somefile.ini" GOTO :ENDINSTALL
msiexec /qn /i "\\10.218.110.21\Setup_Addin\Mailbox Central Outlook Addin.msi"
:ENDINSTALL

Obvoiusly replace:
"%systemdrive%\Program Files\Mailbox Central Outlook Addin\Somefile.ini"
with the file you know should exist after install
0
 
LVL 43

Assisted Solution

by:Steve Knight
Steve Knight earned 100 total points
ID: 35082738
You could keep a flag file on your network drive where they have rights to add, e.g.

@echo off
if exist "\\10.218.110.21\Setup_Addin\log\ok\%computername%.txt" exit
msiexec /qn /i "\\10.218.110.21\Setup_Addin\Mailbox Central Outlook Addin.msi"

REM Check if error returned.  If not then log to OK dir.  If error then log to failed dir.
if "%errorlevel%"=="0" (
  echo Installed %date% %time% > "\\10.218.110.21\Setup_Addin\log\ok\%computername%.txt"
) ELSE (
  echo Failed with error %errorlevel% - %date% %time% > "\\10.218.110.21\Setup_Addin\log\failed\%computername%.txt"
)
Then you can also get a look at who has installed / failed to install

Otherwise you could do a registry check to see if already installed perhaps.

Steve
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 35082785
Cross posted there with first suggestion.  All depends what the software does during install but a file check, registry check for the MSI entries or similar is good for some, or you can use Group Policy to do the work for instance if you have Active Directory.

Otherwise a log file like suggested means you can see centrally who has run the update and when.
0
 

Author Comment

by:happyhenrik
ID: 35082827
gavsmith - it works like a charm, thx
dragon-it - thx for the tip ( I will reward you a little bit :-) )
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question