473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

.NET Installer - FileNotFound error

I've created an installation package for my program.
Before installation, I use the User Interface to get
values that are added to the registry. One of the values
that the user must add is a path to a required input file
for the program. I'm finding that if the user enters a
path which contains a space (example: c:\Program
Files\myProgram\file.txt) that the install will return a
file not found error and abort the install.

I don't understand why the install is even checking that
the file exists, since I'm overriding install with my own
code and I didn't include any code to check that the file
exists. It's not important that the file exist when the
program is installed, only that it exists at runtime
(program will abort if it doesn't exist).

Why does the install check the path and how do I make sure
that it doesn't do that?

Nov 20 '05 #1
3 2611
This sounds a bit odd, I don't know anything off the top of my head that
would cause this, or check for the file. But, it's still a little unclear
to me how things are hooked up in your setup. For example, are you using a
custom action? You said that you are overriding install... perhaps its
something in there?

If you are overriding install, you should call mybase.install, so that the
state document is written, as it's needed by the commit method. That might
be it, and the value entered by the user might be a red herring.
---
David Guyer - VBQA Deployment Testing
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Content-Class: urn:content-classes:message
From: "MovnOn" <LR********@aol.com>
Sender: "MovnOn" <LR********@aol.com>
Subject: .NET Installer - FileNotFound error
Date: Tue, 9 Sep 2003 22:36:47 -0700
Lines: 19
Message-ID: <08****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcN3XYbBGlfiuV1gTFWWqqg39S+Umg==
Newsgroups: microsoft.public.dotnet.languages.vb
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:136186
NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

I've created an installation package for my program.
Before installation, I use the User Interface to get
values that are added to the registry. One of the values
that the user must add is a path to a required input file
for the program. I'm finding that if the user enters a
path which contains a space (example: c:\Program
Files\myProgram\file.txt) that the install will return a
file not found error and abort the install.

I don't understand why the install is even checking that
the file exists, since I'm overriding install with my own
code and I didn't include any code to check that the file
exists. It's not important that the file exist when the
program is installed, only that it exists at runtime
(program will abort if it doesn't exist).

Why does the install check the path and how do I make sure
that it doesn't do that?


Nov 20 '05 #2
So, I'm still not sure what's reading/writing these values, especially
since I think setMorvisionDSN, and other methods are user code.

I'm concerned with stateSaver.Clear, and the fact that you aren't adding
these values from the context into the stateSaver. These are usually used
to uninstall stuff during Rollback and Uninstall methods.

If you'd like to try to debug into your custom action, you can add a line
System.Diagnostics.Debugger.Launch which will bring up the Just In Time
debugger dialog and allow you to attach your IDE to your running custom
action. Then you can step through the code to see if it's in there.
---
David Guyer - VBQA Deployment Testing
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Content-Class: urn:content-classes:message
From: "MovnOn" <LR********@aol.com>
Sender: "MovnOn" <LR********@aol.com>
References: <08****************************@phx.gbl> <yT**************@cpmsftngxa06.phx.gbl>Subject: RE: .NET Installer - FileNotFound error
Date: Wed, 10 Sep 2003 12:46:12 -0700
Lines: 105
Message-ID: <0b****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcN31DAnO39z4Fw7RpaLtbFcmMsfyg==
Newsgroups: microsoft.public.dotnet.languages.vb
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:136444
NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

Here's my installer code:

Public Overrides Sub Install(ByVal stateSaver As
Collections.IDictionary)
MyBase.Install(stateSaver)
setMorvisionDSN(Me.Context.Parameters.Item("ds"),
Me.Context.Parameters.Item("ic"),
Me.Context.Parameters.Item("pw"),
Me.Context.Parameters.Item("ui"))
setLogin(Me.Context.Parameters.Item("un"),
Me.Context.Parameters.Item("mpw"),
Me.Context.Parameters.Item("mp"))
setDSN(Me.Context.Parameters.Item("ds2"),
Me.Context.Parameters.Item("ic2"),
Me.Context.Parameters.Item("pw2"),
Me.Context.Parameters.Item("un2"))
stateSaver.Clear()
End Sub

Among the things the user must enter, is a file path to be
stored in the registry. My code only saved the data, it
doesn't check that the file path exists. The first time
the user entered this path, he got a fileIO file not found
error for the path entered (c:\Program
Files\Program\data.txt) and installation aborted. The next
time, I asked him to try a path with no spaces. When he
entered c:\data.txt, the program installed.

It appears that there's a problem with a path that
includes spaces, but I'm not sure why it's checking the
path in the first place.

-----Original Message-----
This sounds a bit odd, I don't know anything off the top

of my head that
would cause this, or check for the file. But, it's still

a little unclear
to me how things are hooked up in your setup. For

example, are you using a
custom action? You said that you are overriding

install... perhaps its
something in there?

If you are overriding install, you should call

mybase.install, so that the
state document is written, as it's needed by the commit

method. That might
be it, and the value entered by the user might be a red

herring.


---
David Guyer - VBQA Deployment Testing
This posting is provided "AS IS" with no warranties, and

confers no rights.
--------------------
Content-Class: urn:content-classes:message
From: "MovnOn" <LR********@aol.com>
Sender: "MovnOn" <LR********@aol.com>
Subject: .NET Installer - FileNotFound error
Date: Tue, 9 Sep 2003 22:36:47 -0700
Lines: 19
Message-ID: <08****************************@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
Thread-Index: AcN3XYbBGlfiuV1gTFWWqqg39S+Umg==
Newsgroups: microsoft.public.dotnet.languages.vb
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gblmicrosoft.public.dotnet.languages.vb:136186NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

I've created an installation package for my program.
Before installation, I use the User Interface to get
values that are added to the registry. One of the values
that the user must add is a path to a required inputfilefor the program. I'm finding that if the user enters a
path which contains a space (example: c:\Program
Files\myProgram\file.txt) that the install will return a
file not found error and abort the install.

I don't understand why the install is even checking that
the file exists, since I'm overriding install with myowncode and I didn't include any code to check that thefileexists. It's not important that the file exist when the
program is installed, only that it exists at runtime
(program will abort if it doesn't exist).

Why does the install check the path and how do I makesurethat it doesn't do that?


.


Nov 20 '05 #3
How do I add values into stateSaver?

I tried adding the debugging code as the first line in the Install
subroutine, but the error is occurring before the code. I entered the
path C:\Program Files\master.ini and got the error:

Exception occurred while initializing the installation;
System.IO.FileNotFoundException: File or assembly name master.ini, or
one of its dependencies, was not found.

If I enter C:\ProgramFiles\master.ini, I don't get the error even though
this file/path doesn't exist.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #4

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

Similar topics

0
by: HPKrekt | last post by:
If I deploy part of my webproject to a W2K Server I get the following error if I try to use a custom installer: unable to get installer types in the .....dll assembly => One or more of the types...
4
by: Bill Murray | last post by:
I am using VS.NET 2003 and trying to deploy a service program(c++) to a Windows 2000 Server system. I have also written a small DLL (USSsetup.dll) that is used to start/stop the service using a...
2
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...
12
by: SJD | last post by:
I've just read Christoph Schittko's article on XmlSerializer: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnxmlnet/html/trblshtxsd.asp . . . and very informative it is too....
1
by: Craig | last post by:
I have added a 'Textboxes (A)' to my UI installer project along with a custom action to pass the value back to a class I've written to override the void Install function. As long as the text is...
3
by: Brian Henry | last post by:
This has worked perfectly for the past year now all the sudden it will not compile the installer project correctly. All our source code is in a Source Safe database so every system we do this on...
1
by: BuddyWork | last post by:
Hello, When a particular user (has administrator rights) on a Windows 2000 Server SP4 tries to run any MSI's we get the message mentioned in the subject. If we logon with another user that has...
2
by: ashishjainism | last post by:
I am unable to install my windows service and the installutil is throwing the following error: Running a transacted installation. Beginning the Install phase of the installation. See the...
1
by: MimiMi | last post by:
I have a deployment project that was originally created in VS2003. Since I don't have VS2003, I now open it in VS2005, but then of course VS2005 has to convert it. Everything seems to work fine. I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...

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.