Results 1 to 4 of 4

Thread: Need a batch file checking for installation of software

  1. #1
    Join Date
    May 2012
    Posts
    100

    Need a batch file checking for installation of software

    I am have created an application for storing the data of an organization into an database. Now I want to create an installer for my application. I know Visual Studio has in-built package to show the installation of an application. But I want to create such a program that will help me create my own installer for this application. I don’t want any user to get the license and other details like selecting location to install thing while installation. Everything will be pre-designed and all user will have to do is to click and install the software. Can anyone help me create it in Visual Studio by help of a batch file? Does anybody know anything about it?

  2. #2
    Join Date
    May 2011
    Posts
    97

    Re: Need a batch file checking for installation of software

    After you have developed a software, many processes other than installation have to be applied on it. The MWI (Microsoft Windows Installer) package that is available in Visual Studio has many features embedded in it. It has features to install and uninstall the software. If the software is already installed in the computer and the user tries to again install it, then a notification should be given that software is already installed. Do you want to uninstall previous software and then install it again or do you want to repair it notification. This process needs to verify all the existing softwares in the computer. Also the installer has to confirm if all the resources needed for its working is available or not. So when you make the installer for your application you have to give all these features too.

  3. #3
    Join Date
    May 2009
    Posts
    527

    Re: Need a batch file checking for installation of software

    I have tried making the installer for an application from scratch and I succeeded in creating it. The batch file that I created can now install and uninstall an application easily. Though it doesn’t provide massive options and functionality, it will do the basic functionality of a Microsoft Windows Installer (MSI). You just have to use the WMI class Win32_Product along with the Uninstall method. The code for following operation that I got working is,
    Code:
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _
    & strComputer & "\root\cimv2")
    Set colSoftware = objWMIService.ExecQuery _
    ("Select * from Win32_Product " _
    & "Where Name = 'Personnel database'")
    For Each objSoftware in colSoftware
    objSoftware.Uninstall()
    Next
    Try it out and see if it works for you or not. This is just the basic syntax of the batch file that I created. You will need to alter it according to your need.

  4. #4
    Join Date
    May 2009
    Posts
    511

    Re: Need a batch file checking for installation of software

    To create an installer using the batch file to have more functionality to detect existence of softwares and files in a computer. Also to have features like checking the version of the operating system and other hardware that are required for working of the software, you can use the codes given on official website of Microsoft. You will find all your required batch files here using which you can create an installer for your application. You will need to copy these codes in the .vbs file of your project and then change it according to the modules of your application present in your project.

Similar Threads

  1. automating installation using batch file
    By tush9876 in forum Software Development
    Replies: 1
    Last Post: 01-05-2012, 01:28 AM
  2. Replies: 3
    Last Post: 17-02-2012, 02:56 PM
  3. Batch File for doing the Silent Installation.
    By hatred in forum Software Development
    Replies: 4
    Last Post: 27-01-2010, 09:42 PM
  4. Checking Windows Media Player plugin installation
    By Dharmesh Arora in forum Windows Software
    Replies: 3
    Last Post: 27-06-2009, 06:18 PM
  5. Is there a batch file to install software
    By bigboy in forum Windows Software
    Replies: 3
    Last Post: 06-05-2009, 11:20 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,617,996.22437 seconds with 17 queries