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?
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.
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.
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.