Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Wise for Windows Installer

Posted on 2005-04-05
6
Medium Priority
?
568 Views
Last Modified: 2013-11-14
Wise for Windows Installer Question :

I want to run a SQL script but have certain aspects configurable with the [INSTALLDIR] property.  My script is to attach a database :

sp_attach @database='blah' , @filename1='c:\files\file.mdf' , @filename2='c:\files\file.ldf'

so obviously I want to replace the c:\files\ with whatever the user selects as their target.  The Replacement tab doesn't seem to work.  Any suggestions ?
0
Comment
Question by:dhodge
  • 3
4 Comments
 
LVL 2

Expert Comment

by:engelmann_media
ID: 13716539
When do you run this script? And how do you do this normally?
0
 
LVL 2

Author Comment

by:dhodge
ID: 13718312
It needs to be run as a part of the instalation package we are creating
0
 
LVL 2

Expert Comment

by:engelmann_media
ID: 13718519
What SQL server version do you use?

You need a program to run your script with commandline parameters. Do you have something for that?

In Wise for Windows Installer you can select "MSI Script" from the bottom and then "Execute Immediate". Place you script execution at the right place e. g. before "RemoveExistingProduct" within a new If/End block.
0
 
LVL 2

Accepted Solution

by:
engelmann_media earned 1000 total points
ID: 13718537
The if statement should have the condition "Not Installed" if you want to run your script only on installation and not uninstallation.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Starting up a Project
Loops Section Overview

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question