Thursday, March 6, 2014

Installing Software -The Easy way



There are several solutions in the market to install multiple software with one click. Today I want to share a tip, to install software from Command Prompt as a bundle, without using any software. 

I am using WMI to install the software now. For that we need MSI format of the software not the EXE. If you don’t have the MSI version, there are several ways to convert EXE files to MSI. I used this small tool to covert some of my packages.
 
First copy all the MSI software to a folder. I am using “C:\Software” here.
Then create a batch file to install the software. Following is the contents of my my batch file.

wmic product install true,"","C:\Software\7z.msi" /nointeractive
wmic product install true,"","C:\Software\CCleaner.msi" /nointeractive
wmic product install true,"","C:\Software\FileMenuTools.msi" /nointeractive
wmic product install true,"","C:\Software\Firefox.msi" /nointeractive
wmic product install true,"","C:\Software\FoxitReader.msi" /nointeractive
wmic product install true,"","C:\Software\Picasa.msi" /nointeractive
wmic product install true,"","C:\Software\PrimoPDF.msi" /nointeractive
wmic product install true,"","C:\Software\TeraCopy.msi" /nointeractive
wmic product install true,"","C:\Software\Xnview.msi" /nointeractive

copy the above lines to a notepad, replace the software path with yours and save it with a .bat extension.

Now we need to run this file from an elevated command prompt.
If you are using win7/8 type CMD in start menu/screen and press ctrl+shift+enter on CMD icon (or) right click on CMD icon and select “run as administrator”.
If you are using XP type “runas /user:computername\username cmd” in run and type your password. (Replace computername with your computer name and username with administrator user’s name)

Now run the batch file from that command prompt window. The installation should go fine now.  You will know the software installation status from the output of the CMD.




In the above screenshot 7z’s return value was 0, so 7z installed successfully. But for CCleaner the output was 2, the software was not installed on the system.

This is very basic way to install software as a batch, we can’t install all the software silently with this procedure, some software shows dialog boxes while installing.

2 comments:

  1. Action1 deploys software without using any specialized software deployment tools and acts similar installing software remotely using wmic, command line tools (such as if you installed software remotely with psexec) or PowerShell scripts to install software silently on multiple computers in your network.
    https://www.action1.com/p/Free-Install-Software-Remotely-58.html

    ReplyDelete
  2. ethod execution successful.
    Out Parameters:
    instance of __PARAMETERS
    {
    ReturnValue = 1619;
    };

    ReplyDelete