473,728 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Install Project Custom Action Failure

Using VS.Net 2003 .Net framework 1.1 SP1

Our installation project calls a Custom Action dll to perform post install
actions. It fails if the .msi file is launch from a directory that contains
spaces, such as:

My Install Folder\SetupDir

The exception thrown is:

Exception occurred while initializing the installation:
System.IO.FileN otFoundExceptio n: File or assembly name and, or one of its
dependencies, was not found

In the custom action project, I've overridden both Install and Commit. The
commit section is the method that does the actual work. We placed message
boxes at the top
of each function to attempt to see where the failure occurred. We see the
"Reached Install" message but not the Commit. By attaching to the process
I've also confirmed that the call to base.Install(st ateSaver) is called and
does not throw the exception. So somewhere after base.Install(st ateSave)
and the entry into Commit the error mentioned above is thrown. If the .msi
is launched from MyInstallFolder \SetupDir all is fine. Not sure where to go
with this at this point. Help would be appreciated.

public override void Install(IDictio nary stateSaver)
{
MessageBox.Show ("Reached Install");
base.Install (stateSaver);
}

public override void Commit(IDiction ary savedState)
{
MessageBox.Show ("Reached Commit");
base.Commit (stateSaver);
rest of code....
}
May 15 '06 #1
3 7276
Some additional info that appears to be causing the problem. In the
installation project, if you right-click on the project name select
View->Custom Actions then view the properties for the Primary output in the
Commit Folder I've specified /InstPath=[OriginalDatabas e] in the
CustomActionDat a property. If I remove it all is well. The problem is I
need to know the folder that the .msi launched from and don't know another
way to get it.

"Eric" <ms********@noe mail.nospam> wrote in message
news:eF******** ******@TK2MSFTN GP04.phx.gbl...
Using VS.Net 2003 .Net framework 1.1 SP1

Our installation project calls a Custom Action dll to perform post install
actions. It fails if the .msi file is launch from a directory that
contains spaces, such as:

My Install Folder\SetupDir

The exception thrown is:

Exception occurred while initializing the installation:
System.IO.FileN otFoundExceptio n: File or assembly name and, or one of its
dependencies, was not found

In the custom action project, I've overridden both Install and Commit.
The commit section is the method that does the actual work. We placed
message boxes at the top
of each function to attempt to see where the failure occurred. We see the
"Reached Install" message but not the Commit. By attaching to the process
I've also confirmed that the call to base.Install(st ateSaver) is called
and does not throw the exception. So somewhere after
base.Install(st ateSave) and the entry into Commit the error mentioned
above is thrown. If the .msi is launched from MyInstallFolder \SetupDir
all is fine. Not sure where to go with this at this point. Help would be
appreciated.

public override void Install(IDictio nary stateSaver)
{
MessageBox.Show ("Reached Install");
base.Install (stateSaver);
}

public override void Commit(IDiction ary savedState)
{
MessageBox.Show ("Reached Commit");
base.Commit (stateSaver);
rest of code....
}

May 15 '06 #2
You might need to quote the OriginalDatabas ePath as it describes here for
TARGETDIR:
http://msdn2.microsoft.com/en-us/library/2w2fhwzz.aspx

You get the FileNotFoundExc eption because there is a bunch of code parsing
your CustomActionDat a string which is concatenated with some internal
iimplementation string data, such as the name of the assembly containing the
installer class. It's tripping over the parsing of your string and winding
up with a nonsense name for the assembly (and probably the associated state
file).
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

"Eric" <ms********@noe mail.nospam> wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Some additional info that appears to be causing the problem. In the
installation project, if you right-click on the project name select
View->Custom Actions then view the properties for the Primary output in
the Commit Folder I've specified /InstPath=[OriginalDatabas e] in the
CustomActionDat a property. If I remove it all is well. The problem is I
need to know the folder that the .msi launched from and don't know another
way to get it.

"Eric" <ms********@noe mail.nospam> wrote in message
news:eF******** ******@TK2MSFTN GP04.phx.gbl...
Using VS.Net 2003 .Net framework 1.1 SP1

Our installation project calls a Custom Action dll to perform post
install actions. It fails if the .msi file is launch from a directory
that contains spaces, such as:

My Install Folder\SetupDir

The exception thrown is:

Exception occurred while initializing the installation:
System.IO.FileN otFoundExceptio n: File or assembly name and, or one of
its dependencies, was not found

In the custom action project, I've overridden both Install and Commit.
The commit section is the method that does the actual work. We placed
message boxes at the top
of each function to attempt to see where the failure occurred. We see
the "Reached Install" message but not the Commit. By attaching to the
process I've also confirmed that the call to base.Install(st ateSaver) is
called and does not throw the exception. So somewhere after
base.Install(st ateSave) and the entry into Commit the error mentioned
above is thrown. If the .msi is launched from MyInstallFolder \SetupDir
all is fine. Not sure where to go with this at this point. Help would
be appreciated.

public override void Install(IDictio nary stateSaver)
{
MessageBox.Show ("Reached Install");
base.Install (stateSaver);
}

public override void Commit(IDiction ary savedState)
{
MessageBox.Show ("Reached Commit");
base.Commit (stateSaver);
rest of code....
}


May 15 '06 #3
Many thanks. That did it. I tried quoting the value several different
ways but was unaware of the need for the ending backslash.
"Phil Wilson" <pd*******@nosp am.cox.net> wrote in message
news:uR******** *****@TK2MSFTNG P02.phx.gbl...
You might need to quote the OriginalDatabas ePath as it describes here for
TARGETDIR:
http://msdn2.microsoft.com/en-us/library/2w2fhwzz.aspx

You get the FileNotFoundExc eption because there is a bunch of code parsing
your CustomActionDat a string which is concatenated with some internal
iimplementation string data, such as the name of the assembly containing
the installer class. It's tripping over the parsing of your string and
winding up with a nonsense name for the assembly (and probably the
associated state file).
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

"Eric" <ms********@noe mail.nospam> wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Some additional info that appears to be causing the problem. In the
installation project, if you right-click on the project name select
View->Custom Actions then view the properties for the Primary output in
the Commit Folder I've specified /InstPath=[OriginalDatabas e] in the
CustomActionDat a property. If I remove it all is well. The problem is I
need to know the folder that the .msi launched from and don't know
another way to get it.

"Eric" <ms********@noe mail.nospam> wrote in message
news:eF******** ******@TK2MSFTN GP04.phx.gbl...
Using VS.Net 2003 .Net framework 1.1 SP1

Our installation project calls a Custom Action dll to perform post
install actions. It fails if the .msi file is launch from a directory
that contains spaces, such as:

My Install Folder\SetupDir

The exception thrown is:

Exception occurred while initializing the installation:
System.IO.FileN otFoundExceptio n: File or assembly name and, or one of
its dependencies, was not found

In the custom action project, I've overridden both Install and Commit.
The commit section is the method that does the actual work. We placed
message boxes at the top
of each function to attempt to see where the failure occurred. We see
the "Reached Install" message but not the Commit. By attaching to the
process I've also confirmed that the call to base.Install(st ateSaver) is
called and does not throw the exception. So somewhere after
base.Install(st ateSave) and the entry into Commit the error mentioned
above is thrown. If the .msi is launched from MyInstallFolder \SetupDir
all is fine. Not sure where to go with this at this point. Help would
be appreciated.

public override void Install(IDictio nary stateSaver)
{
MessageBox.Show ("Reached Install");
base.Install (stateSaver);
}

public override void Commit(IDiction ary savedState)
{
MessageBox.Show ("Reached Commit");
base.Commit (stateSaver);
rest of code....
}



May 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2021
by: Chris Mullins | last post by:
I have a Windows Service that I created using Visual Studio.NET 2003. No custom code, just an empty Windows Service. In VS.NET, I right click on the service, and say "Add Installer", to create a custom installer for it inside my project. No custom code, just an empty installer as generated by VS.NET. I then create a Deployment project, and set the "custom action" for each of the steps to run the installer found in the Windows Service...
2
5361
by: MENTAT | last post by:
Hi, I am trying to create an installer for my web application. So I added a web setup project to my solution (I am using VS.NET 2003). Been playing around with it since then and it basically works. Now, I am wondering if there is any way to change the directory that the installer installs the files to. I want to be able to put my files in a specified directory (user specified is good, but i don't mind hardcoding the path either) and...
3
12647
by: Ryan | last post by:
I have a simple project, most of it generated by Visual Studio. Public Windows Service Installer (Also generated), with : public class ProjectInstaller : System.Configuration.Install.Installer { ....
3
56997
by: Jeremy S. | last post by:
On my dev machine (XP/Pro with VS.NET 2003) I have been developing a Windows Service and installing it on the local machine by opening the Visual Studio Command Prompt and then executing . Now I want to test this service on a Windows Server 2003 box that doesn't have the Visual Studio Command prompt. How do I go about installing the service on the Windows Server 2003 box? Thanks!
1
1664
by: Eric | last post by:
Our .Net installation project includes a custom action that is launched post install. When the msi is run from a desktop, all is fine. We tested an install doing an Active Directory push to client machines and it failed. The application installed but the custom action would not launch and the install hung. The only error message we could find in the Event Viewer was 'Fatal Error', nothing else. A customer of ours was able to...
10
2738
by: =?Utf-8?B?SmFjayBTbWl0aA==?= | last post by:
Hello, I have a solution that contains a C# application that is installed and runs as a service. The solution also contains several DLLs, some of which are C# assemblies and some are C++ DLLs. The service application references the DLLs. The service app also has an installer class that is set up to run as a custom action in the Setup Project. I am having a problem with signing an assembly. If I add a strong name key to one of the...
0
2127
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Actually, my installer package is not for a Windows Service, but for a WinForms application. Well, it is kind of both: this is a multi-project solution with its main target being a WinForms application, but it also includes a Windows Service. My custom install actions configuration includes output from a Class Library project that contains the custom actions followed by the output of the Windows Service project to register the service....
3
5236
by: =?Utf-8?B?S2VuIExlbWlldXg=?= | last post by:
My clickonce app fails when the install button on the publish.htm page is clicked. User is prompted with a "Cannot Start Application" dialog. Details provided from the dialog are: PLATFORM VERSION INFO Windows : 5.1.2600.196608 (Win32NT) Common Language Runtime : 2.0.50727.3053 System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000) mscorwks.dll : 2.0.50727.3053 (netfxsp.050727-3000)
3
5856
by: KennethLundin | last post by:
Hi, i'm developing a solution in VS9/CSharp. Now I'm constructing a deployment project for my appliation (thick, database driven, winforms, standard, good old type of application). During installation I also install the PostgreSQL database and along with that I need to execute some Custom Actions. I've created a Custom Installer component in CSharp and calls it on Install/Rollback/ uninstall and everything works great (Custom Actions...
0
8891
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9406
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9261
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9185
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9121
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8106
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6703
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3229
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2641
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.