Advanced Installer Creating A Professional Package PDF [PDF]

  • 0 0 0
  • Suka dengan makalah ini dan mengunduhnya? Anda bisa menerbitkan file PDF Anda sendiri secara online secara gratis dalam beberapa menit saja! Sign Up
File loading please wait...
Citation preview

Creating a Professional package The following article uses options that are available starting with the Professional edition and project type. This tutorial will guide you step by step into the creation and customization of an Advanced Installer Professional project. It is addressed to those who have completed the Simple Installation tutorial. • • • • • • • • • • • • • • • • • •



1. Create project 2. Enter product details 3. Set install parameters 4. Add files and folders to your project 5. Add registry keys and values to your package 6. Set launch conditions o 6.1 Video tutorial 7. Add Prerequisites 8. Create new file extensions and make file associations 9. Build and Install 10. Organize your application into features 11. Set dialogs to guide the user during install 12. Set package name and some more build options 13. Add environment variables to your project 14. Add custom actions to your installation package 15. Install and control services 16. Add merge modules to your project 17. Set the UI appearance of your installation package 18. See also



1. Create project Let's suppose you want to create a package for a text editor you have created. We will use a sample editor application built by us. This editor has some characteristics: • • •



For the editor to function properly some registry keys must be present on the target system. Suppose this editor is developed using Visual Basic. In order to work, it needs Visual Basic 6 Runtime to be installed on the target machine. It has a type of file that it associated to, called, say, EDI file.



After launching Advanced Installer, you will be presented with a dialog where you can choose the type of the project you want to create.



Select Professional and press the Create Project button. The new project has been created and from now on you will edit it. Save the project and give it an appropriate name - let's say "Tutorial" for this example. English is the default project language, but you can change it to any of the languages known by Advanced Installer.



2. Enter product details Now you can see the main view split into two panes. In the left pane, you can see all the options you have to edit in your current project, grouped in categories. Switch to “Product Details” page to set the information seen by the user for your installation package. Fill the fields in the right pane with the corresponding data.



For further information about this page please see Product Details Tab.



3. Set install parameters You now have the general information on the Product Details page filled in. Go to the Install Parameters page (click the Install Parameters option).



Set the default installation paths for the "Application Folder" and "Application Shortcut Folder" by using the combo boxes or the [ Edit... ] button. You can edit these fields, but the values from the combo boxes are the most common ones.



For more information about these paths please see the Install Parameters page.



4. Add files and folders to your project



The next step is to add to the project the files and/or folders that compose your application. You will need an EDI file to test the editor's file associations. Since it is a custom type of file, you will have to create it. Use any text editor to create a "foo.txt". Then rename it "foo.edi". Select “Files and Folders” from the “Resources” menu on the left pane. Click on the [ Add Files ] toolbar button and select the files of your application, use our Sample Application. Repeat this step to include the Foo.edi file you have created.



Once the files are added, their names will appear in a list in the right-side pane of the view. Now, let's make a shortcut to the Sample.exe file you just added. Right-click on this file and choose “New Shortcut To -> Installed File”. In the newly appeared dialog choose a name for your shortcut and a location - like in the following screenshot. Press the OK button and the shortcut will appear listed in the application shortcut folder.



For more information please see the Files and Folders page.



5. Add registry keys and values to your package Let's suppose that your application needs two registry entries. These are located in the "Software\[Manufacturer]\[ProductName]\Settings" key. •



One registry value is named "AppPath" and stores the path where your application is installed.







The other one is named "AppSettings" and contains a value that shows the current settings of the application. On install, it has the value "36".



Select the “Registry” page. In the tree, select the "Software\[Manufacturer]\[ProductName]" key. Click on the [ New Key ] toolbar button to create a key. Edit the key name to "Settings". Add a value for it using the [ New Value ] toolbar button. In the "Name" text field enter the name of your first key: "AppPath". Press the [ Folder... ] button and select "Application Folder". Since "Data" is a Formatted Type text field the value that it contains will be expanded at install time into the full path to your application's location. Use the same steps to create the "AppSettings" value. This time when creating the new key select "Binary" and type in the "Data" field the number "36".



Once the registry keys and values are added, you can see them in the right-side pane of the view.



For more information please see the Registry page.



6. Set launch conditions Go to the "System" tab of the "Launch Conditions" page. If you wish that your application should be installed only on a particular set of operating systems make sure that the rest of the operating systems are not ticked in the view.



Create a custom launch condition which will make sure that the package will not be installed if the file "example.txt" does not exist on the partition on which Windows is installed. For this you can follow these steps: • • • • •



Create a File search in the Search page Set the file name to example.txt Rename the search to FILE Use the context menu to add a folder as the location of the search Set this folder to [WindowsVolume] (this is resolved to the partition on which Windows was installed)



• • •



Use the "Test Search" button on the toolbar to test the search Go to the Custom tab in the "Launch Conditions" page Press the [ New... ] button to add this launch condition:



Condition: FILE Description: This application cannot be installed because of the file "C:\example.txt" does not exist.



6.1 Video tutorial A short video with the steps listed above. File Search and Custom Launch Condition



7. Add Prerequisites Let's suppose that your application requires the "My Application.exe" installation package to be installed. This package will install an application and it will create the registry entry HKEY_LOCAL_MACHINE\Software\My Application\Version with the value 1.0. If this application is not already present on the target machine, your package will have to install it before deploying your application. For this, you can use the "Prerequisite" feature. Go to the "Prerequisites" page. Select "New Package Prerequisite" from the context menu. Then select "My Application.exe" installation package from disk.



You can also set the location of the prerequisite as a URL from where the file can be downloaded, by selecting "New URL prerequisite" from the context menu. Or, you can use the "New Prerequisite Wizard" option from the toolbar to guide you through defining your prerequisite. Advanced Installer comes with a list of commonly used prerequisites, for which all the settings are already defined.



After the properties of the prerequisite have been set, you need to set the detection criteria by using the Install Conditions tab.



Presuming that the prerequisite application creates a registry entry, you can select "Install prerequisite based on conditions" and define a detection criteria in the Searches section by setting the registry as a target for the new search.



For more information please see the Prerequisites page.



8. Create new file extensions and make file associations Your application uses files with a particular extension (in our example that is "edi"). You may want to associate that type of files to be opened or edited with your application. Advanced Installer helps you do this in a very simple way. Choose “File Association” in the left pane. Use the [ New Extension ] toolbar button to create a new extension: "edi". Enter a description of this extension in the appropriate field in the right-side pane. You may choose an icon to be displayed for all the files with the extension you created.



For every extension contained in your application, you need to add at least one verb. The name of the verb will be seen in the context menu that appears when you right-click on a file of "edi" type in Windows Explorer. In this example, you should leave the defaults settings. The effect is that when you double click a file or you choose the "Open" action from a context menu of an "edi" file, the application is automatically launched with the command line argument specifying the absolute path of the chosen file.



For more information please see the File Associations page.



9. Build and Install You are now ready to test your program. Build and install your program as described in the Simple Installation tutorial. To test if the file associations are working properly, look in the folder where you have installed the program and double-click the EDI file. This should open using Sample.exe that you have installed. Also, you can verify the value written in the registry for AppPath using Regedit.exe.



10. Organize your application into features Giving the user the possibility to install only some part of your application can be done easily with Advanced Installer. To do this you must organize your application into several features. To see the structure of your application select the Organization page on the left pane. At this moment, all your files are included into a single feature, called "MainFeature". Create a new feature that contains the "foo.edi" example file. In the "MainFeature" only the "Sample.exe" component will be present. Select "Product" in the tree and click the "New Feature" toolbar button. Drag and drop the "foo.edi" component in the newly created feature. To make this feature optional (i.e. to be installed only on Custom or Full types of installation) select in the "Not installed" option.



For more details about features and components see the Organization page.



11. Set dialogs to guide the user during install Go to the Dialogs page. Here you can select the dialogs that appear during install. In our example, you will add two more dialogs:



• •



A dialog in which the user to choose the type of installation (Typical, Complete, Custom). A dialog for displaying a license agreement text. This will allow the user to choose to view the ReadMe file or to launch the application at the end of the installation.



Setup type dialog: • • •



Right-click the Welcome dialog from the left-side pane. Choose “Add Dialog” from the context menu. Select the “SetupTypeDlg” dialog.



License agreement dialog: • • • •



• •



Repeat the previous procedure but select the “LicenseAgreementDlg” dialog from the “Add Dialog” window. Click on the [ Browse ] button from the right-side pane to select from your machine the Rich Text Format file containing the license agreement. Add to your package the ReadMe file for your application (use the “Files and Folders” options page). Select the “ExitDialog” dialog from left-side pane. In the right-side pane, check the “Show "View ReadMe" option” checkbox; you will be prompted to choose the ReadMe file. Choose the file you just added to your package. Check the “Launch Application at the end of installation” checkbox and select from your package the application that will be launched at the end of the installation.



Note that the user can choose not to see the ReadMe file or to launch this application.



For more information please see the Dialog Editor page. Build and test the package again.



12. Set package name and some more build options



Select the “Builds” page from the left-side pane and navigate to the Configuration Settings Tab. Set "MyPackageName" in the "MSI name" text field. If you let this field empty, the name of the package will be the same as the name of your project.



For more details about the available options please see the Builds page.



13. Add environment variables to your project Let's suppose your application needs some information stored in an environment variable. In our example, we will add a variable - "SAMPLE_PATH" - that will contain the path to the folder in which your application will be deployed. Select “Environment” in the left pane. Click on the [ New Variable ] toolbar button and fill the fields of the newly appeared dialog.



For more information please see the Environment Variables page.



14. Add custom actions to your installation package Custom actions are useful when you need to perform a specific action during installation and there is no other way to do it. The custom action is entirely defined by you; in Advanced Installer you only specify the file that contains it, and some parameters for its execution. You can add custom actions contained in EXE files, DLL files, VBScript files or JavaScript files.



Select “Custom Actions” in the left pane in order to add a Custom Action. Select the "Install Execution Stage" -> "Add Resources" action group in the left-side pane. Choose from the toolbar “Launch installed file”. Select from the FilePicker dialog the "Sample.exe" file (you included this earlier in your project). In the command line field pass the string "foofile". The effect is that Sample will try to open this file. If "foofile" doesn't exist on the target machine, Sample will ask the user whether it should create a new one. This is how the command line arguments behave.



For more information please see the Custom Actions page.



15. Install and control services In this step, we will define the services to be installed with your application. You can only install services that are part of your package.



First, use the “Files and Folders” option to add the service file (a native Windows service) to your project. Go to the “Services” page in the left pane. Click on the [ New service ] toolbar button. Select the service file from the dialog that appears and fill the service properties fields as in the screenshot below.



You can control your service or any other service installed on the target machine during installation. The above operations installed both the service and the service control. The following screenshot shows you exactly the control service operation parameters.



For more information about this please see the Services page and the Java Service Installation tutorial.



16. Add merge modules to your project Let's suppose you install an application that requires Microsoft C Runtime Library. The logic and files that compose this library already exist in the merge module. You can include this module in your package and it will be installed with your application. This way, you are sure your application will work on every machine. With Advanced Installer it is very easy to add a merge module to your package. Choose “Merge Modules” in the left pane. Click on the [ Add merge module ] toolbar button and browse to your msm file.



For more information please see the Merge Modules page.



17. Set the UI appearance of your installation package Go to the "Themes" page in the left pane. In the"Preview" tab you can change the banner showed on the dialogs and the background from the first and the last dialog. Choose one of the Advanced Installer predefined images or you can use one of your own by expanding “More options” and double-clicking “DialogBitmap” or “BannerBitmap”.



For more information please see the Themes page.



How do I create a silent installation package? When deploying MSI installation packages through GPO or SMS or simply to your clients, you may want to make them silent. This can be done in several ways:



1. Basic user interface through Advanced Installer Advanced Installer allows you to make the installation package silent by setting the LIMITUI property inside the MSI. This is done automatically when you check the Limit to basic user interface (simple progress and error handling) option in the Install Parameters page.



2. Basic or no user interface through the MSIEXEC command line When launching the MSI package from the command line you can use multiple "msiexec.exe" parameters which affect the user interface: • • • •



full UI: /qf (this is the default parameter used by the package) reduced UI: /qr (the user interface does not show any wizard dialogs) basic UI: /qb, /passive (only a progress bar will be shown during the installation) no UI: /qn, /quiet (no UI will be showed during the installation)



On Windows Vista and above, in order to silently install a package you must use an elevated command prompt. If the package is run from a non-elevated command prompt the install will fail with the "Error 1925. You do not have sufficient privileges to complete this



installation for all users of the machine. Log on as administrator and then retry this installation" displayed in the install log.



3. Basic or no user interface through the bootstrapper If your installation package uses an EXE bootstrapper then you can set it to launch the MSI package with a specific command line. In this command line you can use the same parameters used when launching the MSI with MSIEXEC. The command line of the MSI package can be specified in the MSI Command Line field on the Configuration tab in the Builds page.



The MSIEXEC parameters can also be used for the bootstrapper (for example test.exe /qn). In this case they will be passed to the MSI package.



On Windows Vista and above, in order the install the package silently the installation package should run elevated. This can be achieved by using the "Run as administrator" context menu option from Windows Explorer or by setting the execution level to Run as administrator in the Installation Options section of the Install Parameters. In this case when launching the installation package the UAC prompt will appear asking for elevated rights.



How to attach to a database during installation The following article uses options that are available starting with the Enterprise edition and project type. To attach to a database during installation, you can proceed as follow: 1) In the Files and Folders page you can add the database file as a regular file. 2) The next step is to establish the connection the server. In the Dialogs page you can add the SQLServerConnectionDlg dialog from the build-in list of dialogs. On this dialog, the user can enter the server details. Also, this dialog adds predefined functionaility for free, such as: database browse functionality, testing the SQL connection, choosing the authentication method (SQL Authentication or Windows Authentication). When adding this dialog, a connection to the server is created in the SQL Databases page. The SQL server browse and database browse operations are added for free.



3) Add the SQL Script to attach to the database. It can be something like this: CREATE DATABASE MyAdventureWorks ON (FILENAME = 'myDatabaseFilePath'), (FILENAME = 'myDatabaseFilePath') FOR ATTACH; USE DATABASE MyAdventureWorks



The myDatabaseFilePath is a property that will be set with the path of the database file at install time. For details on how to attach to a database using Transact-SQL, please take a look on the Using Transact-SQL article. 4) In the Script Replacement tab you can create a SQL replace operation to set the property with the path of the database file, as below:



Prerequisite Properties Tab In this tab you can edit the properties of a new prerequisite or change the properties of an existing one.



Display This section contains the information showed to the end-user when the prerequisite wizard is launched. Note that this information does not affect in any way the prerequisite.



Name The name of the prerequisite. This information will be shown to the user in the prerequisites wizard and does not affect the prerequisite detection or installation.



Ver Min The minimum version required, for the prerequisite to be installed. This information will be shown to the user in the prerequisites wizard and does not affect the prerequisite detection or installation.



Ver Max The maximum version required, for the prerequisite to be installed. This information will be shown to the user in the prerequisites wizard and does not affect the prerequisite detection or installation.



This information will let the end-user know what prerequisites must be installed in order to install your application.



Options Reboot system after installing this prerequisite The user will be prompted to reboot the machine after the prerequisite is installed. If the user accepts a reboot, the machine will be automatically restarted and the installation will continue, otherwise the installation will be aborted.



Continue with main installation even if the prerequisite is not installed When this option is unchecked, the main product installation will not fail as in case of a launch condition but it won't be allowed until the prerequisite is installed.



It is recommended to also have an appropriate launch condition for each prerequisite set with this option.



Enabling this option for a feature-based prerequisite will not rollback the installation when the prerequisite fails if you're running the main package in silent mode. This is happening because during a silent installation any feature-based prerequisites will always be installed after the main installation when it's too late to rollback.



Compression Archive prerequisite files using LZMA Compression This allows you to enable LZMA Compression for your prerequisite files.



In order to use compression, your prerequisite files must be included in the EXE bootstrapper. This setting can be changed in the Configuration Tab page.



Registration



Register prerequisite with Visual Studio Registers the prerequisite with Visual Studio. Registered prerequisites can be selected when creating "Setup and Deployment" projects.



Register prerequisite with Advanced Installer Registers the prerequisite with Advanced Installer. Registered prerequisites can be added by selecting Packages root element in the "Additional Packages" list from the Prerequisites page.



Only after installing a package with prerequisites registered this way, they will appear as predefined in Advanced Installer or Visual Studio.



Mysql database instal setup Postby veena » Thu Aug 26, 2010 11:43 am Sir, am using ur software for creating install setups. Now i have a java program with mysql database i can embedd jre to run the software(Without installing java in the system) like wise,i want to embed the mysql database (system doesnt contains mysql ) ie,similar to wamp(In wamp installation ,we cannot c the mysql installation,but it is installing in the back end process) Am so urgent ,to do that.. pls respond to me and help me too.. Thank u..



Re: Mysql database instal setup Postby CiprianComsa » Thu Aug 26, 2010 12:56 pm Hi and welcome to Advanced Installer Forum, You can add MySql setup as a prerequisite in the Prerequisites page. Our tutorial on "Adding prerequisites" explains the process of adding a prerequisite to your package. I would recommend to install the prerequisite with basic user interface (use the command line switch "/qb" ). Best regards, Ciprian ______________________________________________________________________________



_________________________________________________________________________ Ciprian Comsa Advanced Installer Team http://www.advancedinstaller.com/ Ciprian Comsa - Advanced Installer Team



Re: Mysql database instal setup Postby veena » Fri Aug 27, 2010 5:29 am Thank u sir for ur reply i have done dat as prerequistic but it is showing the user interface of mysql..thats my pblm.. so u have said that to limit the ui ..i'll try it and contact u soon.. thank u again



Re: Mysql database instal setup Postby veena » Fri Aug 27, 2010 7:34 am Sir 1. I take the page of software prequistics 2. click new and browse the path 3. double click and take the properties and set the command line as /qb 4. but not working,it is showing the mysql prompt /qb is not working it is showing the interface of mysql pls help me sir



Re: Mysql database instal setup Postby CiprianComsa » Fri Aug 27, 2010 12:34 pm Hi, There is a similar discussion on the forum, please take a look here. Let me know if there is anything else you need help with. Best regards, Ciprian ______________________________________________________________________________ ___________________________________________________________________ Ciprian Comsa



Advanced Installer Team http://www.advancedinstaller.com/ Ciprian Comsa - Advanced Installer Team



Re: Mysql database instal setup Postby CiprianComsa » Fri Aug 27, 2010 1:17 pm Hi, What kind of installer you use for MySql? Best regards, Ciprian ______________________________________________________________________________ ____________________________________________________________________ Ciprian Comsa Advanced Installer Team http://www.advancedinstaller.com/ Ciprian Comsa - Advanced Installer Team



Re: Mysql database instal setup Postby veena » Sat Aug 28, 2010 5:44 am hi sir, i got a new type of mysql set up with no gui ..so am happy with that the link for that is http://www.devside.net/guides/windows/mysql this link can be useful for some others having the same problem anyway thanks for ur help..



Re: Mysql database instal setup Postby uply1969 » Mon Oct 08, 2018 12:04 pm I would recommend to install the prerequisite with basic user interface you can get more information here: Cassandra Tutorial



Re: Mysql database instal setup Postby Catalin » Mon Oct 08, 2018 1:49 pm



Hello and welcome to Advanced Installer forums, Thank you for contributing to our forums. I am sure this will be of help for other users. Regards, Catalin Catalin Gheorghe - Advanced Installer Team



.Net Problem with mysql database Postby shamwaghmare » Tue Nov 25, 2008 10:10 am Hi I new to deployment can you please guide me through this I am using VS 2005 and mysql 5 Client is asking for in the installation following things should happen 1) silent Installation of mysql server with predefined password so user can not know it. 2)Automatic restoration of mysql database What will be the procedure to this .



Thanks in Advance



Re: .Net Problem with mysql database Postby Cosmin » Tue Nov 25, 2008 11:06 am Hi, silent Installation of mysql server with predefined password so user can not know it. This can be done by adding MySQL Server as a prerequisite for your package. Please note that the User Guide contains a tutorial which may help you. In order to install MySQL Server silently, you can use a custom command line for its package in the Properties tab of the "Edit Prerequisite" dialog. Unfortunately the MySQL server installation package doesn't support specifying the password from the command line. However, you can try using a BAT file as a custom action to set the password after MySQL server is installed.



Automatic restoration of mysql database For this you can try using the SQL Scripts feature. Please note that the User Guide contains a SQL Scripts tutorial which may help you. Regards, Cosmin Cosmin Pirvu - Advanced Installer Team



Install and configure mysql Postby pejman taghipoor » Mon May 21, 2012 9:34 am hello. i want install and configure MySql server. i add MySql.exe to Prerequisites. it's work but manually.and i should config it. and i should add my data base with MySqlTools(such MySQL Administrator,navicat). how i do install And configure and add my dataBase? (i use advanced installer ver.8). Please help.



Re: Install and configure mysql Postby whistle » Tue May 22, 2012 12:48 pm Hi, To install mysql server , you can use the following commandline: mysqld.exe" --install "ServiceName" --defaults-file="path\my.ini" in this case ,mysql is a service and it will be started automatically. To create database and add some data to the mysql, you can use the following commandline: mysql.exe -f -h localhost -u root -p password < data.sql the password should be your mysql password. the data.sql is some sql command that can create database and insert data to the mysql, and it can be created by navicat and others. all of above is my understanding , I hope that can be used to help to you. Note: I 'm not the administrator and the engeer, it just be my words.



all the best



Re: Install and configure mysql Postby CiprianComsa » Tue May 22, 2012 12:59 pm Hi, If you want to install and configure automatically your MySQl Server and execute SQL Scripts please follow the next steps: 1. Add MySQL Server Setup as a prerequisite for your package from Prerequisite page. 2. In order to install MySQL Server Setup silently, you can use a custom command line (/qb) in the "Install Command Lines" fields" from "Prerequisites page -> Prerequisite Setup File tab". Please note, when MySQL is installed silently, MySQL service is not installed. The MySql service can be installed as service using the next command line: Code: Select all mysqld --install



For starting the service you can use the next command line: Code: Select all NET STAT mysql



For executing this commands lines using Advanced installer you have to follow the next steps: 1. Go to "Custom Actions" page and create a new "Launch EXE with working directory" custom action with sequence under the "Install Execution Stage -> Searches" action group like this: File Path: mysqld Command: --install Working: Path to mysql\bin\ 2. Add a new "Launch file" custom action with sequence, scheduled after the above one, like this: File To Launch: cmd.exe Command Line: /c NET START mysql Working Directory: Run as Adminsitrator: checked For configuring the MySQL Server you can use a BAT file as a custom action after MySQL server is installed. For execution of SQL Scripts Files you cand use SQL Databases feature.



Please note that the User Guide contains a SQL Scripts tutorial which may help you. Regards, Ciprian ______________________________________________________________________________ ____________________________________________________________________ Ciprian Comsa Advanced Installer Team http://www.advancedinstaller.com/ Ciprian Comsa - Advanced Installer Team



Re: Install and configure mysql Postby nicko » Mon Jun 10, 2013 3:20 am hello, I am a beginner in Advanced Installer, I follow this steps in creating my installer with mysql and I got this problem "directory manager not initialized". so I searched for the solution for this problem. I sequenced the custom action after the cost initialized. after building and running the installer, I got this error "target paths not created. No path exists for entry APPDIR in Directory table". any help please. I had trouble fixing this error.



Re: Install and configure mysql Postby Daniel » Tue Jun 11, 2013 3:10 pm Hello, I'm not sure why this happens. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them? Also, can you please give us more details about your scenario. All the best, Daniel Daniel Radu - Advanced Installer Team



Re: Install and configure mysql Postby @clyde » Fri Oct 07, 2016 11:04 am Hi. I'm having problem in executing mysqld.exe --install. I'm using launch exe with working directory.



Attachments Mysql repackage.aip (125.49 KiB) Downloaded 199 times



Re: Install and configure mysql Postby Daniel » Wed Oct 19, 2016 2:06 pm Hello, I think this happens because you are executing your "LaunchExeWithDirectory" custom action as "Immediately". Can you please set, in "Custom Actions" page, its execution time to "When the system is being modified (deferred)" and see if this helps? Please note that all files that you add in "Files and Folders" page will be installed during "Add Resources" action group on the deferred stage of the install execution. Also, as a side note, please take a look on our "How to install mysql server 5.0 and Connector silently" and "MySql server installation fails with MySQLInstallerConsole as custom action" threads to check other ways to configure the newer MySQL server versions. All the best, Daniel Daniel Radu - Advanced Installer Team



Re: Install and configure mysql Postby goldeneaglesteam » Tue Feb 20, 2018 12:44 am how to install MySQL service with another display name?



CiprianComsa wrote:Hi, If you want to install and configure automatically your MySQl Server and execute SQL Scripts please follow the next steps: 1. Add MySQL Server Setup as a prerequisite for your package from Prerequisite page. 2. In order to install MySQL Server Setup silently, you can use a custom command line (/qb) in the "Install Command Lines" fields" from "Prerequisites page -> Prerequisite Setup File tab". Please note, when MySQL is installed silently, MySQL service is not installed. The MySql service can be installed as service using the next command line:



Code: Select all mysqld --install



For starting the service you can use the next command line: Code: Select all NET STAT mysql



For executing this commands lines using Advanced installer you have to follow the next steps: 1. Go to "Custom Actions" page and create a new "Launch EXE with working directory" custom action with sequence under the "Install Execution Stage -> Searches" action group like this: File Path: mysqld Command: --install Working: Path to mysql\bin\ 2. Add a new "Launch file" custom action with sequence, scheduled after the above one, like this: File To Launch: cmd.exe Command Line: /c NET START mysql Working Directory: Run as Adminsitrator: checked For configuring the MySQL Server you can use a BAT file as a custom action after MySQL server is installed. For execution of SQL Scripts Files you cand use SQL Databases feature. Please note that the User Guide contains a SQL Scripts tutorial which may help you. Regards, Ciprian ______________________________________________________________________________ ____________________________________________________________________ Ciprian Comsa Advanced Installer Team http://www.advancedinstaller.com/



Re: Install and configure mysql Postby Daniel » Tue Feb 20, 2018 12:46 pm Hello and welcome to our forums, Can you please try the approach I exposed on "How to install mysql server 5.0 and Connector silently" thread?



Just change the value set to the "ServiceName" command line parameter from step 4. Let us know if this helped, otherwise please give us more details about your requirements. All the best, Daniel



Re: Install and configure mysql Postby goldeneaglesteam » Wed Feb 21, 2018 10:00 pm thank you Daniel wrote:Hello and welcome to our forums, Can you please try the approach I exposed on "How to install mysql server 5.0 and Connector silently" thread? Just change the value set to the "ServiceName" command line parameter from step 4. Let us know if this helped, otherwise please give us more details about your requirements. All the best, Daniel



Re: Install and configure mysql Postby Daniel » Thu Feb 22, 2018 9:30 am You are always welcome. All the best, Daniel Daniel Radu - Advanced Installer Team



How to install mysql server 5.0 and Connector silently Postby Zaheer » Sun Jul 05, 2015 1:42 am Hi I use Advance Installer 10.6 At Present i am installing mysql server 5.0 and MySQL Connecter as an Pre Requisite which works perfectly for manual installation but as my Customers are not able to install MySQL and we are loosing our customers i want to know how to install mysql server 5.0 and MySQL Connector Silently i have checked many threads under this forum and



tried doing it but was unsuccesfull. I am sending the MyProduct.aip file in which i have removed some of things like my Java Product my jar files and my mysql scripts file for the Security Reasons and Following are the things i have done: I have created an exe file for my java project then i have created another exe for running some of the mysql scripts through command line for that i have created an custom action named aijclw.exe in the Custom actions page Also i am installing mysql-essential-5.0.17-win32.msi and mysql-connector.msi as an Prerequisite so that the user has to install manually now i want my users to install both the above msi that is Sql Server and Connector silently for doing it i have tried a lot but was unsuccesfull as i could not understand how to make it. please help me in this please check my MyProduct.aip file in the attachments and it would be helpfull if you could please make necessary changes where i have done my .aip . So that mysql server 5.0 and Connector can be installed silently can be installed silently also MySQL service has to be done silently. Please Help... Attachments MyProduct.aip (264 KiB) Downloaded 122 times



Re: How to install mysql server 5.0 and Connector silently Postby Daniel » Mon Jul 06, 2015 11:42 am Hello, To silently install your prerequisites you should go to "Prerequisites" page, select, in turn, your added prerequisites and in the "Install Command Lines" fields from "Setup Files" tab use the following command: Code: Select all /qb



Also, please take a look on the "Install and configure mysql" thread which expose how you can install and configure the MySQL service. If you have any questions just let us know.



All the best, Daniel Daniel Radu - Advanced Installer Team



Re: How to install mysql server 5.0 and Connector silently Postby Zaheer » Tue Jul 07, 2015 11:30 am Hi,... I have tried the above thing but was not successfull as somewhere it gets the problem 1. I have tried /qb in the Install Command lines but to i get UI to Install MySQL manually 2. Then i tried /qn but too it shows the problem saying Some of the things in the Package 3. Then i have tried "msiexec /i mysql-essential-5.0.17-win32.msi /qn" in Silent(UI) under install command lines also i have tried inserting the same statement in all the 3 fields that is in FULL UI, Basic UI, Silent UI under install command lines I have also tried "msiexec /i Product.msi /qn" but too was not successfull I have also created an custom action with File Path : mysqld Command line : --install Working Directory : ProgramFilesFolder\MySQL\MySQL Server 5.0\bin I have also created File Launch FileToLaunch : cmd.exe Command Line : /c NET START mysql and checked run as Administrator But After Doing all these also i am unsuccessfull cud u please tell how should it be done. Where i am doing wrong



Re: How to install mysql server 5.0 and Connector silently Postby Daniel » Thu Jul 09, 2015 8:44 am Hello, After further investigating the MySQL server installation and service configuration scenario I found a resolution as it follows: 1. to silently install the MySQL server you can launch, from an elevated process, its setup package by using the /qn command line 2. to configure the MySQL service you can launch the installed MySQLInstanceConfig.exe with a specific command line Here it is a detailed step by step configuration you can implement into your project: 1. go to "Install Parameters" page and enable the "Run as administrator" option



2. go to "Prerequisites" page and add your prerequisite setups (MySQL Server and MySQL Connector/ODBC) as pre-install prerequisites 3. select, in turn, the added prerequisite items and in their "Setup Files tab -> Install Command Lines fields" add the following command: Code: Select all /qn



4.go to "Custom Actions" page and add a "Launch file" custom action with sequence, scheduled as deferred with no impersonation just after "Install Execution Stage -> Add Resources" action group, configured like this: File to launch: Code: Select all [ProgramFilesFolder]MySQL\MySQL Server 5.0\bin\MySQLInstanceConfig.exe



Command line: Code: Select all -i -q "-l[WindowsVolume]mysql_install_log.txt" "-nMySQL Server 5.0" "p[ProgramFilesFolder]MySQL\MySQL Server 5.0" "t[ProgramFilesFolder]MySQL\MySQL Server 5.0\my-template.ini" ServerType=DEVELOPMENT DatabaseType=MIXED ConnectionUsage=DSS SkipNetworking=yes StrictMode=yes Port=3311 ServiceName=MySQL RootPassword=password



5. rebuild and test the project Also, I've attached two sample projects (one created with AI 10.6 and the other with 12.2.1) which implement the above settings. sample.zip (7.33 KiB) Downloaded 411 times The installation was successfully tested on two machines: Windows 7 x64 and Windows 8.1 x64. If you have any questions just let us know. All the best, Daniel Daniel Radu - Advanced Installer Team



Re: How to install mysql server 5.0 and Connector silently Postby Zaheer » Sat Aug 08, 2015 11:42 am



Hello,... MySQL Server 5.0 is installing successfully but while installing the main application it throws an error saying Code: Select all {SQL_STATE: HY000} Cant connect to MySQL server on 'localhost' (10061)



and the installation gets roll back I think MySQLServerInstanceConfig.exe is not getting installed I have inserted the below path in the command line Code: Select all -i -q "-l[WindowsVolume]mysql_install_log.txt" "-nMySQL Server 5.0" "p[ProgramFilesFolder]MySQL\MySQL Server 5.0" "t[ProgramFilesFolder]MySQL\MySQL Server 5.0\my-template.ini" ServerType=DEVELOPMENT DatabaseType=MIXED ConnectionUsage=DSS SkipNetworking=yes StrictMode=yes Port=3306 ServiceName=MySQL



Please observe in the above command line that i have changed the Port=3306 from 3311 as you sent and as i dont want to set the password i have left the password field Please Help,...



Re: How to install mysql server 5.0 and Connector silently Postby Zaheer » Mon Aug 10, 2015 10:27 am Please Help in doing this



Re: How to install mysql server 5.0 and Connector silently Postby Daniel » Mon Aug 10, 2015 2:53 pm Hello, I'm not sure why this happens. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them? All the best, Daniel



Daniel Radu - Advanced Installer Team