/build/static/layout/Breadcrumb_cap_w.png

Pushing Windows Installer (MSI) packages with a batch file

hello guys,

 

i created this batch file to push a software to users pc. how can make this batch file work in KACE

:**********************************************************************************
: The command below will install EIM
:
: EIM_INPUT_SERVERNAMEORIP the server name or IP of the EIM server
: EIM_INPUT_STANDARDPORT the non-trusted port number for the client to use
: EIM_INPUT_TRUSTEDPORT the trusted port number for the client to use
: EIM_INPUT_USETRUSTEDPORT either true or false
: INSTALLDIR is the directory where EIM will be installed
: ALLUSERS set this to an empty string ("") if users do not have administrator
:  rights to their computer. This will install start menu items and desktop
:  shortcuts for the logged in user only, not the other users on this
:  machine. To use the default behavior, and install for all users, simply
:  remove the ALLUSERS="" section.
: NOTE: to run this installer "quietly" (aka without showing the normal
:  install dialogs) include the /qn option at the end

msiexec /i "\\myserver\mysharfolder\pweimclient_v4000.msi" EIM_INPUT_SERVERNAMEORIP="192.168.5.8" EIM_INPUT_STANDARDPORT=7777 EIM_INPUT_TRUSTEDPORT=7778 EIM_INPUT_USETRUSTEDPORT=true INSTALLDIR="%PROGRAMFILES%\Passageways\Enterprise Instant Messenger" /qn

:**********************************************************************************

 

thanks

 

alex

 


0 Comments   [ + ] Show comments

Answers (7)

Answer Summary:
Posted by: SMal.tmcc 11 years ago
Red Belt
3

create a 1000 script and put the remarks in the notes and in the "on success" launch a program

On Success

Launch “c:\windows\system32\msiexec.exe” with params “/i ”\\myserver\mysharfolder\pweimclient_v4000.msi“ EIM_INPUT_SERVERNAMEORIP=”192.168.5.8“ EIM_INPUT_STANDARDPORT=7777 EIM_INPUT_TRUSTEDPORT=7778 EIM_INPUT_USETRUSTEDPORT=true INSTALLDIR=”%PROGRAMFILES%\Passageways\Enterprise Instant Messenger“ /qn”.

Comments:
  • how about if install the software from a pc then upload to kace and then manually add the command to install msiexec /i pweimclient_v4000.msi EIM_INPUT_SERVERNAMEORIP="192.168.5.8" EIM_INPUT_STANDARDPORT=7777 EIM_INPUT_TRUSTEDPORT=7778 EIM_INPUT_USETRUSTEDPORT=true INSTALLDIR="%PROGRAMFILES%\Passageways\Enterprise Instant Messenger" /qn

    will this work - brighstarcuit 11 years ago
    • You would be better off creating a .cmd file with that info and calling the .cmd file in your command line. Zip the cmd file and the msi up together and upload them to the Kbox. - dugullett 11 years ago
  • i created the file how can i call the cmd file in the command line file name IM.txt - brighstarcuit 11 years ago
  • name the file im.cmd and this will cause the command inturpreter to run it by calling it, somewhat like a bat file. - SMal.tmcc 11 years ago
  • Well it should really be IM.cmd. You might want to check on that. You did zip this CMD file with your msi correct?

    Install the software on a test machine. After the install run an inventory on that machine so that the software record will be created. Upload your zip to that software record.

    Create a managed install.
    1. Select "Configure manually"
    2. Command Line = IM.CMD
    3. Delete Downloaded Files.
    4. Apply the labels and messages (if needed). - dugullett 11 years ago
  • in the command file do i still need to point to the server where i have the software

    msiexec /i "\\myserver\mysharfolder\pweimclient_v4000.msi" EIM_INPUT_SERVERNAMEORIP="192.168.5.8" EIM_INPUT_STANDARDPORT=7777 EIM_INPUT_TRUSTEDPORT=7778 EIM_INPUT_USETRUSTEDPORT=true INSTALLDIR="%PROGRAMFILES%\Passageways\Enterprise Instant Messenger" /qn - brighstarcuit 11 years ago
    • No. Since your zipped it with your CMD file you can just use the following:

      msiexec /i pweimclient_v4000.msi /qn - dugullett 11 years ago
  • in the command file should i just remove the \\\myserver\mysharefolder and replace it with pweimclient_v4000.msi - brighstarcuit 11 years ago
    • Yes.

      This might help you.
      https://kace.webex.com/kace/lsr.php?AT=pb&SP=TC&rID=62471757&act=pb&rKey=f3a43577d975b9a3

      https://kace.webex.com/kace/lsr.php?AT=pb&SP=TC&rID=62177067&act=pb&rKey=e13c801a6248f5c7 - dugullett 11 years ago
  • i made the change to command file and and zip up the msi and the im.cmd file in my push i am using to im.cmd i setup my test pc nothing is happening what am i doing wrong - brighstarcuit 11 years ago
    • Make sure you ran an inventory update. Maybe post a screenshot of what you have for the managed install. Along with the cmd file that you used. - dugullett 11 years ago
  • i did run an inventory update. this is the cm.file i have

    msiexec /i "pweimclient_v4000.msi" EIM_INPUT_SERVERNAMEORIP="192.168.5.8" EIM_INPUT_STANDARDPORT=7777 EIM_INPUT_TRUSTEDPORT=7778 EIM_INPUT_USETRUSTEDPORT=true INSTALLDIR="%PROGRAMFILES%\Passageways\Enterprise Instant Messenger" /qn - brighstarcuit 11 years ago
Posted by: Ben M 11 years ago
9th Degree Black Belt
3

The other option is too simply create a Managed Installion for this software, and instead of uploading the MSI file just upload the batch script and run it.


Comments:
  • either will work since the installer is on a share, use what works easist for u - SMal.tmcc 11 years ago
  • Yea I generally use this option, but both are viable. Just depends on what will work best in each situation. - Ben M 11 years ago
  • agreed, there are always at least 3 ways to do something in windows, and usually more just try to stay consistant so you do not confuse yourself and other co-workers - SMal.tmcc 11 years ago
  • That's one of the things I love about Windows. - Ben M 11 years ago
Posted by: dugullett 11 years ago
Red Belt
3

If you are going to use kscrpting make sure you use the verify. If not it will continue to run everytime it is scheduled.

Upload msi as dependency.

Verify: Directory exists  %PROGRAMFILES%\Passageways\Enterprise Instant Messenger

Remediation: Run batch file or msiexec to install software.


Posted by: brighstarcuit 11 years ago
7th Degree Black Belt
1


Comments:
  • Yeah.... any way you can make that bigger? I'm not that old, but I can't see that.

    What do you have under "Managed Action"? I'm not seeing any machines listed or labels either?

    Take a look at this.
    http://jetscreenshot.com/ - dugullett 11 years ago
  • i took the machine out of that list - brighstarcuit 11 years ago
  • wow this is a pretty cool tool thanks for sharing YOU ROCK dugullett
    http://my.jetscreenshot.com/demo/20120802-ua9a-462kb.jpg - brighstarcuit 11 years ago
    • Everything looks correct here. When you open your zip file you see just your CMD file and the msi. It's not still a txt is it?
      Also at the bottom of this screen if you click "show all" it will give you a status of the machines you deployed to. That way you can make sure it's even attempting. - dugullett 11 years ago
  • yes i did the cmd file not txt in my status i am only seeing 2 attempts - brighstarcuit 11 years ago
    • Hmmm.... next I would try just using msiexec /i pweimclient_v4000.msi in your IM.CMD file. See what that will give you. It should bring up a prompt to install your software. The above script works on a machine when ran locally? - dugullett 11 years ago
  • i know i can use that use that command bu i am trying to install this software with 0 users intervention - brighstarcuit 11 years ago
    • Right... just doing this to test. If you are getting the install prompt then there's something wrong in your command line. An extra space or something. This will just make sure that the actual push is working. - dugullett 11 years ago
  • its working now i did have an extra space thanks a million for all your help dugullett are you ok to share your email address with me i would love to pick your brain - brighstarcuit 11 years ago
    • Sorry.... no can do on that one. I answer questions on here, and turn it off on nights and weekends. I'm usually on here M-F anyways. Just keep asking here so that everyone can benefit. I would also encourage you to vote on this http://kace.uservoice.com/forums/139919-itninja/suggestions/2395959-ability-to-invite-specific-users-to-answer-a-quest so that you can always just invite certain users.

      Also watch these webexs. I used to play them over my lunch break while I ate. They are packed with very helpful knowledge.

      http://www.kace.com/support/resources/kb/article/kace-kontinuing-education-k1000-and-k2000-recordings

      I would also get involved in these weekly webexs. You will usually see me on there. There are generally some great questions asked that help. On Thursdays they usually do an open question type webex. Even if you don't have questions it's good to hear others.

      http://www.kace.com/support/resources/kb/article/Kace-Kontinuing-Education-Training-Session-Schedule

      Also I'm not sure of your test environment, but you should be using VMs. I'm currently using VMware workstation with my hard drives set to "non-persistent". I usually screw a lot up in the beginning, but that's ok because I reboot and start from scratch again. This can also be done with snapshots. - dugullett 11 years ago
Posted by: piyushnasa 11 years ago
Red Belt
1

Use %~dp0 for the current path rather than using the servername and place the bat file in the same directory as the installer.

Posted by: bob002num1 8 years ago
White Belt
1
i use winfresh for this, it works like ninite but its a win app
you can just click the apps you want and edit the apps.info file, its basically a csv file, to add your own apps to install
www.winfresh.org
Posted by: jagadeish 11 years ago
Red Belt
0

msiexec /i "\\myserver\mysharfolder\pweimclient_v4000.msi" EIM_INPUT_SERVERNAMEORIP="192.168.5.8" EIM_INPUT_STANDARDPORT=7777 EIM_INPUT_TRUSTEDPORT=7778 EIM_INPUT_USETRUSTEDPORT=true INSTALLDIR="%PROGRAMFILES%\Passageways\Enterprise Instant Messenger" /qn

 
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