Solved

Skip .bat installation if present

Posted on 2011-03-09
4
416 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Running Visio Macro from VBS File 3 111
network copying issue 4 71
Windows XP on domain not allowing domain admins to RDP in 10 105
Remote start and stop of service 3 46
Can I legally transfer my OEM version of Windows to another PC?  (AKA - Can I put a new systemboard in my OEM PC?) Few of us are both IT and legal experts but we all have our own views of Microsoft's licensing rules and how they apply.  There are…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 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