473,625 Members | 3,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.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 2628
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: AcN3XYbBGlfiuV1 gTFWWqqg39S+Umg ==
Newsgroups: microsoft.publi c.dotnet.langua ges.vb
Path: cpmsftngxa06.ph x.gbl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:136186
NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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\myProgra m\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.Clea r, 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.Diagnost ics.Debugger.La unch 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: AcN31DAnO39z4Fw 7RpaLtbFcmMsfyg ==
Newsgroups: microsoft.publi c.dotnet.langua ges.vb
Path: cpmsftngxa06.ph x.gbl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vb:136444
NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb

Here's my installer code:

Public Overrides Sub Install(ByVal stateSaver As
Collections.ID ictionary)
MyBase.Install( stateSaver)
setMorvisionDSN (Me.Context.Par ameters.Item("d s"),
Me.Context.Par ameters.Item("i c"),
Me.Context.Par ameters.Item("p w"),
Me.Context.Par ameters.Item("u i"))
setLogin(Me.Con text.Parameters .Item("un"),
Me.Context.Par ameters.Item("m pw"),
Me.Context.Par ameters.Item("m p"))
setDSN(Me.Conte xt.Parameters.I tem("ds2"),
Me.Context.Par ameters.Item("i c2"),
Me.Context.Par ameters.Item("p w2"),
Me.Context.Par ameters.Item("u n2"))
stateSaver.Clea r()
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: AcN3XYbBGlfiuV1 gTFWWqqg39S+Umg ==
Newsgroups : microsoft.publi c.dotnet.langua ges.vb
Path: cpmsftngxa06.ph x.gbl
Xref: cpmsftngxa06.ph x.gblmicrosoft.publ ic.dotnet.langu ages.vb:136186NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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\myProg ram\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.in i and got the error:

Exception occurred while initializing the installation;
System.IO.FileN otFoundExceptio n: 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
1415
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 in the assembly unable to load. If I exclude the custom installer everything installs correctly. On my development system XP professional the above error is not raised and everything install correctly including the custom installer . Also if I...
4
7405
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 custom action. This dll is apparently dependent on the MSVCP71.DLL and MSVCR71.DLL's as per the Detected Dependencies folder visible in the deployment project All this good except I am UNABLE to Retarget the output of the msm merge...
2
5343
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...
12
8482
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. I, too, am getting nasty FileNotFound exceptions. I've read, and digested the article, and I think I've found a bug -- it's difficult to track, though it does happen often.
1
8462
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 very simple everything is working just fine. I've tested it by writing the string out to a text file to test it. However, the trouble comes in when I use the textbox for what I really intended, a ADO.Net Connection String. The textbox is to...
3
1887
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 should be identicle. On one system the installer project will compile correctly, but on two others it will fail with this error. ------ Rebuild All started: Project: Installer, Configuration: Debug ------ Building file 'T:\Current Builds...
1
3787
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 administrator rights then it works, if we create a new administrator user then it does NOT work, Here is the MSI log, please help as this is causing problems as only 3 users on this box are able to run MSI where are about 15 other users
2
12814
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 contents of the log file for the d:\practice in .net\mywindowsservice\mywindowsservice\mywindowsservice\bin\practiceservice.exe assembly's progress. The file is located at d:\practice in...
1
1500
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 build the project and an installer.msi - file as well as a setup.exe - file is created. Now to the problem: double-clicking the setup.exe doesn't work! It gives me the error "An error occured while downloading a required file. You may retry...
0
8256
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
8189
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
8497
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
7184
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...
0
5570
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
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2621
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
1
1803
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.