Setup Application Problems

  • Thread starter Thread starter Barry
  • Start date Start date
B

Barry

Hi

I have a Setup app, the setup proceeds well, however the application when
started creates a Folder where the application resides. This folder shows
up in the Windows menu. is there some way to avoid the folder from showing
up.

TIA
Barry
 
Do you mean the folder is visible in windows explorer, or that there is an
icon for the application in the windows start menu? If it is the first,
then I think you would change the visibility of the folder in a custom
action. If it is the second, then it is because there is an icon shown in
the "file system view" of your setup project, and you just delet it.
 
Hi

The folder is visible in Windows Start Menu not in Explorer, i will check if
there is a icon in the setup project and delete.

Thanks.
 
Just some clarity

I run setup a item is create in Windows Menu (the folder item is not
present). I run the application for the first time, the application creates
a Folder. This newly created folder is now visible in the Windows Menu as a
menu item.

Any idea how to avoid creation of the folder as a Windows Menu item ?
 
I'm on my way out the door, so I cannot verify this at the moment. I think
what you are describing is a function of windows remembering the most recent
applications used. I don't think this has anything neccessarily to do with
your setup application.
 
I didn't find it hard to believe, it was just hard to understand what you
were seeing. The picture makes it very clear!

1. Does your application create a folder in the working directory called
"Downloads" if it does not find an existing folder?
2. What is the "Working Folder" property set to for your application Icon in
the start menu?

I can recreate your example by making the working folder be the location of
the start menu icon. I then check if a folder exists there (which it does
not after install). I then create a folder in the working folder. This
does just as your image shows, by creating a new folder in the start menu
next to my installed apps icon.
 
Yes the application create a folder the first time this application in the
working folder ie Application.Startup

I do not know what if the property of the "working Folder" application, it
must be the default
 
The image was not visible, changed the status now.

To many typos in my previous message

Yes the application create a folder the first time this application in the
working folder ie Application.Startup

I do not know what if the property of the "working Folder" application, it
must be the default

SHOULD READ AS

Yes the application create a folder the first time this application is run,
in the
working folder ie Application.Startup

I do not know what is the property icon of the "working Folder" application,
it
must be the default
 
In the setup project, you need to look at the "File View". The folder called
"User's Programs Menu" is, I believe, where you will find a folder and your
start menu icon. That icon will show a property for the working folder. I
believe that the working folder is incorrectly set. The working folder for
the icon should be pointing to the folder named "Application Folder".

The process I'm describing is from VS 2008. If you are using 2003/2005, it
may vary slightly.
 
There is an alternative, which would be for your code to query the assembly
location and use that to find where to create the folder instead of assuming
the startup folder is the same as the assembly. In c# it would be:

String strPath = System.IO.Path.GetDirectoryName(
System.Reflection.Assembly.GetExecutingAssembly().CodeBase);
 
I am using VS 2005 for this project, if as you mention it work ok in VS
2008, then it is possible that this issue has been corrected in VS 2008, i
think i have not yet applied the SP for VS 2005, maybe it will solve it.

I just checked "User's Program Menu" but did not find anything unusual there
that might solve the problem
 
Just for curiosity sake

Will the code for creating a folder using the code snippet help in
eliminating the Windows Menu issue?

Also, what is the advantage of using the code snippet you provided v/s
Application.StartupPath
 
This System.IO.Path is an interesting class, often when i need to find the
extension, i would use LastIndexOf method of String Class

System.Reflection.Assembly.GetExecutingAssembly() is also very useful.
 
-
Family Tree Mike said:
I'm on my way out the door, so I cannot verify this at the moment. I
think what you are describing is a function of windows remembering the
most recent applications used. I don't think this has anything
neccessarily to do with your setup application.
 
Back
Top