Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Installing a pre-requisite based on a user's response

Updated: 21 May 2010 | 10 comments
roguethought's picture
0 0 Votes
Login to vote

I'm using Wise Package Studio Pro. I'm building a windows installer ( .exe format ) that is Win32 only, and 64bit.

I have a prerequisite that I want to be able to auto-detect if it's there or not. If it's not there, install it. If it is there, don't install it.

I can't figure out how to set this option. Another option would be to ask the user if they want to install it, and install based on their yes/no response. I would prefer to detect, though.

How do I make it so my setup detects whether the prerequisite is installed, and only install if it's not there? Everything else in the installer will need to be installed, it's just this one component that I need to detect for.

discussion Filed Under:

Comments

Eshwar's picture
07
Jan
2009
1 Vote +1
Login to vote

How about a vbscript?

I would rather use a single vbscript to do the following tasks

- Prompt a dialog box to user whether to install or not
- If YES, Check for the existance of the application
- If the application doesn't exist then only install

To display message box to the user before install, try my script at

https://www-secure.symantec.com/community/download...

Let me know so that i can help you with the script.

Good luck

Thanks,
Eshwar

haim96's picture
07
Jan
2009
0 Votes 0
Login to vote

found this: Prerequisites

found this:

Prerequisites page. Additional runtimes have been added to the Runtime Details dialog. To access this dialog from the Prerequisites page, select Add > Runtime.

in here:
http://www.altiris.com/upload/wise_002.htm

as far as i understand, wise installer should handle Prerequisites in installation...

EdT's picture
22
Jan
2009
0 Votes 0
Login to vote

I assume you are compiling to

I assume you are compiling to EXE as this is the simplest way of distributing your MSI together with any pre-requisites. When you add a pre-req to your EXE project, you will find that the button that allows you access to the wisescript that forms the EXE "Wrapper" is enabled.
Once you get access to the Wisescript, you can then add additional code around the section that installs your pre-requisite, to perform any checks you require, prior to installation.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Ravi's picture
28
May
2009
0 Votes 0
Login to vote

Not able to compile when selecting prerequisites

Hi Eshwer,

I am working on packaging this app- Workshare 5.2
http://www.appdeploy.com/packages/detail.asp?id=1489
which comprise of couple of kB's ,msi & setup files.What I am trying to do is i am creating tranform for the main msi(workshare msi) and in this MST FILE i am adding all other applications as prerequisite (which should be installed prior to main msi) with reqd silent switches.
The issue I am facing with is as soon as I compile it give error that workshare.wse couldn't found.
Eshwer When you say "get aceess to the Wisescript" how to achieve/get that?
because here in my case this wise script is not getting created.
the setps which i followed are -
step 1. created transform for main msi(which has to be installed in last)
2. go to build options and choose - create an EXE
3.go to prereq tab and check option - Dont check the launch cond of msi until after running prerequisite
add all setup.exe and msi with command lien switches
then i compile
and get error-
<appname>.wse couldnt be opened.please check spelling of the filename and that the file is accessible.
I referred wise install editor PDF also and as per that it says that in case wise installion system not able to communicate with Windows Installer you check for three wse files and if not available copy them
""If you have Wise Installation System, but it doesn’t contain the script actions that
communicate with Windows Installer (Get Windows Installer Property, Set Windows
Installer Property, and Evaluate Windows Installer Condition), you can copy them into
the Wise Installation System. From the Wise Package Studio/WiseScript Editor/Actions
folder, copy the 3 .WSE files named for these 3 script actions and paste them in your
Wise Installation System/Actions folder. After you reopen the Wise Installation System,
these actions are available."
These files also present on my machine.
I tried with Wise package studio 5.5 professional edition as well as wise 7 standard edition,but no success:(

Please suggest me what should i do?

Thanks & Regards,
R Ray

piyushnasa's picture
24
Jan
2009
0 Votes 0
Login to vote

Good method

I think this is really a good method to do it.
You can create an external VBScript in which you can first call this and then your package.
Good script Eshwar

Piyush Nasa Altiris Certified Professional (ACP)

http://msiworld.blogspot.com/

EdT's picture
02
Feb
2009
0 Votes 0
Login to vote

The simplest solution that

The simplest solution that does not require scripting is to use system search. If an application is already installed, it should have an entry in Add/Remove programs, so you can search for its registry footprint at
HKLM/Software/Microsoft/Windows/CurrentVersion/Uninstall/{product Code} - check for something like Display Name in the many keys that are present.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Eshwar's picture
02
Feb
2009
1 Vote +1
Login to vote

importance of scripted installation

After packaging the application we always use VBscript to install the application [along with TRANSFORM if applicable]. There are advantages of installing an application using vbscript like...

- Checking prerequisites
- Returning exit codes to the ALTIRIS

We deliver the applications using ALTIRIS and it is always important to get an exit code returned to the ALTIRIS, informing whether the application has been installed or not.

For more information check the following:
https://www-secure.symantec.com/community/article/...

You can always display message boxes before and after installation using vbscript.

For more information check the following:
https://www-secure.symantec.com/community/download...

Thanks,
Eshwar

EdT's picture
02
Feb
2009
1 Vote +1
Login to vote

Yes, it is good commercial

Yes, it is good commercial practice to have an established process for all apps. Out of interest, have you tried the vbscript solution on Vista?

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Eshwar's picture
04
Feb
2009
1 Vote +1
Login to vote

Not yet!

We have Windows XP SP3 environment. I never worked on Vista as far as scripting is concerned.

Thanks,
Eshwar

EdT's picture
04
Feb
2009
0 Votes 0
Login to vote

If you have the opportunity

If you have the opportunity to do some testing on Vista, then take it. Vista offers a lot more challenges to packagers due to the UAC - it can and does prevent wisescript and vbscript custom actions running and you have to pay a lot more attention to code signing, or turn off the UAC, which many corporate users will resist due to security issues.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.