By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,071 Members | 1,244 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,071 IT Pros & Developers. It's quick & easy.

Custom Install/User Interface problem

P: n/a
I created an install for my program. During installation,
3 User Interface dialogs display asking for values that
will be stored in the registry. I'm not registering
anything, just storing values for database connections and
where the program can locate necessary files.

I've found that if there's a blank space in any of these
input values (ie. a path name of c:\Program Files\Data\)
that an error displays and the installation aborts. The
error is "Exception occurred while initializing the
installation: System.IO.FileNotFoundException: File or
assembly name , or one of its dependencies, was not found."

The custom install doesn't check that this is a valid file
and the same error will appear if a blank space is
included in any of the input values (including connection
info). Also, I haven't been able to debug this since the
error occurs/appears before my install sub executes (I set
the debugger to start on the first line and it never did.)

Has anyone else encountered this problem? Is there a fix
or workaround?

Thanks.
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I don't know how helpfull this will be to you, but when you have a directory
(or file) that has spaces in it, you can refer to them in an 8 character
format (or 8.3 format for files) like so:

c:\Program Files\Data\
is the same as
c:\Progra~1\Data\

c:\My Documents\Summer Vacation.doc
is the same as
c:\MyDocu~1\Summer~1.doc

The format is the first six characters of the directory or file then a tilde
(~) character and a 1. You might run into a problem if the computer you are
installing on has two dirctories (or files in the same directory) that would
reduce down to the same 8 character name:

If you have a directory called "c:\Programming Library\" it will reduce to
"c:\Progra~2\" because the program files directory reduces to progra~1 (and
it was created first).

Additionally in vb, when you are assigning the value to the string variable
that will hold a path, try doing it like this:

installPath = """C:\Program Files\Data\"""

Notice the three quotes at the beginning and end. The first quote is
because it is a string, the next two tell vb to actually store a quotation
character in the string. I believe that the errors you are getting are
because the operating system is getting your path (c:\Program Files\Data\)
and interpreting it as a file called "C:\Program" with a command line
parameter of "Files\Data\". If you put the path in quotes, it should
understand that you mean that to be a path. Sorry if that sounds confusing.
Give it a try anyways. Hope that helps.

fp
"Lori" <LR********@aol.com> wrote in message
news:1b****************************@phx.gbl...
I created an install for my program. During installation,
3 User Interface dialogs display asking for values that
will be stored in the registry. I'm not registering
anything, just storing values for database connections and
where the program can locate necessary files.

I've found that if there's a blank space in any of these
input values (ie. a path name of c:\Program Files\Data\)
that an error displays and the installation aborts. The
error is "Exception occurred while initializing the
installation: System.IO.FileNotFoundException: File or
assembly name , or one of its dependencies, was not found."

The custom install doesn't check that this is a valid file
and the same error will appear if a blank space is
included in any of the input values (including connection
info). Also, I haven't been able to debug this since the
error occurs/appears before my install sub executes (I set
the debugger to start on the first line and it never did.)

Has anyone else encountered this problem? Is there a fix
or workaround?

Thanks.

Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.