PDA

View Full Version : InstallScript



sanjayk
06-14-2006, 12:33 AM
Is it possible to generate installscript automatically or we need to add code in setup.rul manually?

I have created the project using project assist.Can I generate installscript automatically based on the project created?

Thanks in advance

Sanjay

DebbieL
06-14-2006, 08:47 AM
Adding the InstallScript to the setup.rul file isn't quite automatic. If you're looking for some guidance on adding functions and function parameters to your script, you might want to consider using the Function Wizard in InstallShield. This wizard helps you add function calls.

To use the Function Wizard:
1. In the InstallScript view, click your Setup.rul file. InstallShield displays the script in the right pane.
2. Find the location in the script where you want to insert a function call, and place the cursor there.
3. On the toolbar button, click the Function Wizard button. (It's the button that's between the right arrow button and the Build button, which looks like a CD.)
4. Follow the panels in the wizard to select the function and the associated parameters that you want to add in your script.
When you finish the wizard, InstallShield adds the function call to your script.

The InstallScript Language Reference (http://helpnet.macrovision.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield12langref/LangrefHome.htm) section of the help contains a lot of information on the various built-in InstallScript functions, predefined constants, operators, and other InstallScript language information. You also might want to review the Using InstallScript (http://helpnet.macrovision.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield12helplib/IHelpIScriptOverview.htm) section of the help.

Debbie Landers
Macrovision Corporation

MichaelU
06-14-2006, 09:48 AM
I think we're a little confused by the question. If you're asking whether you have to manually code InstallScript to install each of the features, components, and files that are in your install, then the answer is no. the engine primarily operates on the aggregates, each of which are part of the MEDIA, and it's aware of all of these.

If you're asking if you need to manually code the UI experience, then the answer is still no - use the dropdowns above the code to insert the OnFirstUIBefore event's default code, and then you can tweak it as desired.

You only need to tweak the code if you want to customize the behavior further than what the Project Assistant allows. If you add files in the project assistant, select options in the Installation Interview, and run your installer, it should do what was described without you needing to change any code.

Generally people who choose the InstallScript project do so because they want to customize it further, and will modify and add code manually.

sanjayk
06-15-2006, 06:49 AM
Thanks to all for the quick reply.I got the exact answer from both posts.I can go ahead.

Thanks Again

Sanjay

Christopher Painter
06-15-2006, 09:21 AM
Wanting to 'generate setup code automatically' is really the whole motivation behind Windows Installer. You author data into MSI Tables ( feature, component, file, registry, directory ectera ) and WindowsInstaller turns this into one big script at install time. The odds and ends that it can't do using its built-in patterns are called "Custom Actions". These CA's are what you write by hand.

Before writing any CA, ask yourself if you are fully leveraging WindowsInstaller. This is how you cut down on writing script.