Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Im a trying to build a msi with visual studio pro ->Setup Project -> Custom Actions(SQLEXPRESS.EXE)
 

Im a trying to build a msi with visual studio pro ->Setup Project -> Custom Actions(SQLEXPRESS.EXE)

Im a trying to build a msi file but have a problem.

I use the "setup project" template in visual studio pro tobulid a msi file for my application.I need sql express for my app. So i am trying to build an installation file(msi)with my app and sql Express.

When i run the installation file i have created the sql Express run into an error, it says something about another installation is already in progress". Yes my msi file is running in the back ground, wich have started the sql express- installation.

Anyone who knows how to get around this?

I just want to install both these applicationsat the same time!

Regards
Marreoragarn

WHats wrong  Sunday, November 05, 2006 9:51 PM

Exactly... so just to go your project properties dialog, select PreRequisites, and then click the checkbox for SQLExpress. After you build, install by using setup.exe instead of mysetup.msi...

David Guyer MSFT  Tuesday, November 07, 2006 7:25 AM
Wscript is notvalid in Windows Installer vb script. You're not running in WSH. Just use CreateObject all the time, not wscript.createobject.
PhilWilson  Sunday, November 12, 2006 7:09 PM
SQL Express is also using an msi setup, and you cannot run two msi setups concurrently. So ninstead of launching the sqlexpress setup from a custom action, you should install it as a prerequisite, i.e. use a exe that will run the two msi setups in sequence.
Stefan Krueger  Monday, November 06, 2006 6:13 PM

Exactly... so just to go your project properties dialog, select PreRequisites, and then click the checkbox for SQLExpress. After you build, install by using setup.exe instead of mysetup.msi...

David Guyer MSFT  Tuesday, November 07, 2006 7:25 AM

So if I erase the custom action and selecting the sql Express under prerequisites, then i should be able to install these two program in a sequence if I clicking on the setup.exe instead of the msi-file?

The setup.exe is automaticly generated when rebuilding the project? It's a smaller file than the msi-file!

Regards

Matz

WHats wrong  Wednesday, November 08, 2006 11:56 AM

The sql Express folder is generated, with sqlexpress_setup.exe inside,but the installation of the file is not starting!

I have done as you said, (I think)!

What can be the problem now?

/Matz

WHats wrong  Wednesday, November 08, 2006 2:51 PM

It works!
SQL Express did not install because I already had it on my computor! When I deleted it the setup.exe installed it.

Thanks fort your answers!

Sorry, I have another question also!
Anyone knows how to connect a database (install a database) with a script from custom Action?

Regards
Matz

WHats wrong  Wednesday, November 08, 2006 3:56 PM

Are you running this on your Visual Studio computer? It won't install if it's already installed.

Also, what's sqlexpress_setup.exe? I would have expected setup.exe, with a SQLExpress folder and in that folder a SQLExpress32.exe...

David Guyer MSFT  Thursday, November 09, 2006 7:02 AM

Are you running this on your Visual Studio computer? It won't install if it's already installed.

Yes I know that now :)

The file is named setup.exe from build!

I have a problem with Custom Action. I trying to run this script from a Custom Action.

When the installer(setup.exe) runs, it starts fine but when setup.exe shall run my VB-script it says that i could not run the script. Whats wrong?

The script working fine alone, I mean it works when i manually run it by clickingon it!

Se the script below:

Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set WshNetwork = WScript.CreateObject("WScript.Network")

Dim MyString
MyString = "sqlcmd -S " & WshNetwork.ComputerName & " -E -i drop.sql -i CreateWhsDB.sql -i alla_SP.sql"

Set oExec = WshShell.Exec(MyString)

WHats wrong  Friday, November 10, 2006 3:42 PM
Wscript is notvalid in Windows Installer vb script. You're not running in WSH. Just use CreateObject all the time, not wscript.createobject.
PhilWilson  Sunday, November 12, 2006 7:09 PM

You can use google to search for other answers

Custom Search

More Threads

• ClickOnce Publishing Issues after RenewCert
• ClickOnce On-Line Appliation not Getting Latest Fixes When Publishing
• Click Once URL and Activation
• Deploying dll with application question
• Setup Runs Automatically
• Problem with WIX
• Changing msi version with msiintel.sdk???
• Problem with setup of solution install
• "another version of this product is already installed"
• Create setup package w/Com Interop