|
-
Apr 9th, 2009, 07:54 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Icon and Deployment Path
Hi. I'm using v2008 Standard Edition deployment Setup1. In the Properties, it seems I haved to declare the manufacturer and this results in a deployment path such as:
C:\Program Files\TOSHIBA\MyAppFolder\ when the setup CD I created is used. I really want C:\Program Files\MyAppFolder\ as the path. I'd also like to put an icon on the desktop and create a folder in My Documents that can contain two txt files as part of the deployment. I'm stuck as to how to edit the package. Are these options possible? I've searched MSDN, but found no immediate answer I can put together into necessary steps. Help appreciated.
-
Apr 9th, 2009, 08:00 AM
#2
Re: Icon and Deployment Path
Hey,
The path that the setup application uses by default, if I remember correctly is C:\Program Files\CompanyName, so you should be able to set the CompanyName within the properties of the setup project and away you go.
As for the icon on the desktop, this is very easy. In the file system view of the setup application, create a shortcut to the main exe in the folder that points to the desktop.
Hope that helps!!
Gary
-
Apr 9th, 2009, 08:08 AM
#3
Thread Starter
Addicted Member
Re: Icon and Deployment Path
Thanks Gary. I can set the Company name to something else in Properties, but I just don't want an extra sub-folder for my App. I'll give the desktop shortcut a try.
-
Apr 9th, 2009, 08:22 AM
#4
Re: Icon and Deployment Path
Hey,
There is nothing to stop you overriding the default installation location to be something completely other though, this is just what it is by default.
Gary
-
Apr 9th, 2009, 08:36 AM
#5
Thread Starter
Addicted Member
Re: Icon and Deployment Path
Hey.
So I could, If I wanted run a small application with files from anywhere? OK - I did my Build of Setup1 and I can switch Views to FileTypes, UserInterface, FileSystem, BUT can't see where to override the default path to something else. Should there be vsomethng in these folders? Trying out Setup.exe from the Setup1 Debug folder does install the project, but not quite how I want it. Wher's the place I can editr?
-
Apr 9th, 2009, 09:39 AM
#6
Re: Icon and Deployment Path
Hey,
Can you clarify what you mean by this:
Code:
So I could, If I wanted run a small application with files from anywhere?
What I meant was, that the Setup Project when you run it, will default to something like, C:\Program Files\Company Name\Setup Project Name, but there is nothing to stop the user overriding this during the installation.
However, you can set this to what ever you want by:
1) Right Click on the Setup Project and select View | File System
2) Select Application Folder
3) Look at the Properties for this and find DefaultLocation, this is set to [ProgramFilesFolder][Manufacturer]\[ProductName]
4) Change this to what ever you want.
Hope that helps!!
Gary
-
Apr 9th, 2009, 10:41 AM
#7
Re: Icon and Deployment Path
Moved To Application Deployement
-
Apr 9th, 2009, 11:56 AM
#8
Thread Starter
Addicted Member
Re: Icon and Deployment Path
Hi Gary. Clarification - Yes. It's that old VISTA write file problem. I've found it useful to put the App .exe in Program Files and any data I need to write to, such as Excel, or Text files in a folder in My Documents. That way, they get backed up (we hope) and the app does not bomb out because Vista has stopped it writing to Program Files. However, I can think of occasions when I might deploy the whole application if it is small, to a My Documents subfolder so the VISTA write file problem does not arise. Does that make sense? Thanks for the previous reply, by the way.
Having tested this, the only thing it seems to miss out is creating the App folder if it does not already exist in Program Files. It works if I create it before using Setup.exe for the installation.
Last edited by Kochanski; Apr 9th, 2009 at 12:07 PM.
Reason: Typing errors
-
Apr 9th, 2009, 01:58 PM
#9
Re: Icon and Deployment Path
Documents/My Documents is a poor choice for program data. This is meant to be the user's primary workspace. Littering it with non-document files and folders isn't very friendly.
This is why we have the ProgramData folder, which maps to ssfCOMMONAPPDATA, also known as CSIDL_COMMON_APPDATA and now also FOLDERID_ProgramData. For per-user data you might want CSIDL_LOCAL_APPDATA (ssfLOCALAPPDATA or FOLDERID_LocalAppData) or sometimes CSIDL_APPDATA (ssfAPPDATA or FOLDERID_RoamingAppData).
ssf = "shell special folder"
CSIDL = "constant special item ID list"
Desktop shortcuts are kind of tacky as well, this is why we have the Start Menu.
-
Apr 9th, 2009, 03:17 PM
#10
Thread Starter
Addicted Member
Re: Icon and Deployment Path
Well. I agree only partly. The program, an .exe itself certainly should be buried in Program Files. However, there's a great deal of sense having .txt and .xml files in an area the user frequently backs up. The most useful piece of coding I have found is this, because it avoids Vista UAC problems and in my view is far better than declaring the file location as the App folder. I use the following frequently:
Code:
Dim myFolderName As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) & "\AppDATA\"
'FILE NAME STRING
Dim data2 As String = myFolderName & "DataTemp.txt"
That way, you always know where the data is and the program .exe can find it.
-
Apr 9th, 2009, 05:45 PM
#11
Re: Icon and Deployment Path
The AppData folders are included by most backup programs (including the one built in to Vista), so that is not a valid excuse for cluttering up the Documents folder.
The Documents folder is a place where the user is likely to delete/edit files outside of your program, and thus cause errors or other problems - and no matter what you think, that would be your fault for putting the files there rather than in the proper place.
For more information on the folders you should be using, see the article Where should I store the files that my program uses/creates? from our Classic VB FAQs (in the FAQ forum, which is shown near the top of our home page). The code is not relevant to you, but that is only a small part of the article.
-
Apr 10th, 2009, 03:25 AM
#12
Thread Starter
Addicted Member
Re: Icon and Deployment Path
Thanks for the link and the advice. I'll check it out and modify my code accordingly so I don't leave files in My Documents.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|