473,750 Members | 2,182 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 7279
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
2022
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
5365
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
56999
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
2129
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
8999
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
8836
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9394
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...
0
9256
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...
1
6803
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...
0
6080
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4885
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3322
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
3
2223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.