Deployment issues

I am have trouble getting my data directory created in the Program Data directory.  I have created a custom file in Target Machine File System and made its default location [CommonAppDataFolder] but that doesn't seem to work.  

My second problem is getting the correct picture on the desktop and program files shortcut.  They each get placed in the correct location but don't have the app default icon on them.  

Everything else seems to deploy and work fine.
LVL 2
MoedAsked:
Who is Participating?
 
Jacques Bourgeois (James Burger)Connect With a Mentor PresidentCommented:
For SQL Server, yes there is a front end, although you can do most of the work from inside Visual Studio. A lot of programmers do not use the front end, its is needed only for some administrative tasks that might not be needed for a simple database of the type you create in Access.

Open the Server Explorer from the View menu, right click on the DataConnections and navigate to your Access database. That will give you a rough idea. The thing is pretty limited with Access, but it lets you do everything with SQL Server: create and define tables, set the fields properties, read and write in those tables, create queries (views) and stored procedures (you might have to learn a bit of SQL it do not already write some queries in SQL in Access)

And deployment is not a pain, as long as you use the Express solution. There is also a compact edition that is even easier to deploy, but is more limited in what it can do.

-----

If you are willing to pay the fare to Indianapolis, no problem for me, but all my training material is in French... :-)

I give public training in the Montreal and Quebec area. I also move around in the province of Quebec for private in-house training.

-----

Many system administrators think "Welcome security, at last"

Most programmers think "Damn security"

You cannot please everybody, even when you are called Microsoft.

If you want an Access database, easy to install with the application, in read and write mode and that the user will be able to backup without your intervention when he cannot see the AppData directory, then you are stuck with 2 choices: My Documents (this is what Microsoft expects you to do, because they consider an Access database as being a user's document), or another directory that you create under the Users directory, but not under AppData (this is not something you would normally do). These are the only directories in which a user typically has almost every right.
0
 
Jacques Bourgeois (James Burger)PresidentCommented:
What do you exactly mean by [CommonAppDataFolder] doesn't seem to work? Note that this is the common directory for all users on the computer, the Users\Default\AppData\Local directory under Windows Vista or Windows 7, not the specific user's directory. Normally, you do not put things directly there, but you create a sub-directory with your company name, and under it one for the application.

The icon for the application does not come automatically. You have to specify it through the Icon property of the shortcut.
0
 
MoedAuthor Commented:
James;
Just looking over your post to my other question.  My first deployment build.  UUUgh.
I have the commonappdatafolder as the default folder to create the new folder under but for some reason it doesn't get created when I run the install.  I want to place the app database in this folder.  My guess is there's some little tweak somewhere that I've failed to do.  What I'm looking for is the database to be in [CommonAppData]\Plant Data.  Hope that makes sense.  
As a side note, why would app data be stored in a hidden file.  Isn't that kind of hard to backup if the user can't see the folder?  It would seem to make more sense to me to make a folder like [SystemDrive]\plants.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
MoedAuthor Commented:
Here's what I'm trying to accomplish.  Whats wrong with this picture?

VS-Screenshot.bmp
0
 
Jacques Bourgeois (James Burger)PresidentCommented:
AppData is not meant to be controlled by the user, only by the application or by administrators.

If you want something that the user has access to for any reason, the recommended location is the users Documents directory, unless it is some kind of media that would be better located in My Music, My Pictures and the likes.

Personnaly I do not really like that, because as a user, I think that My Documents should be reserved for documents that are actually created and Saved As by the user. That would prevent my own documents from being mixed up with a lot of stuff that is useless for me as a user. Unfortunately, I am not Microsoft, and I do not create the rules.

In your case, it is a database. It has been clear for a good 10 years now that Microsoft is becoming one-minded as far as databases are concerned: as a programmer, you should use a server database. And server databases have their own way of being installed and used that enables you to store them somewhere else than My Documents.
0
 
MoedAuthor Commented:
After my latest attempt. The folders were not created but the database file did get copied to the ProgramData folder.
0
 
MoedAuthor Commented:
I know the day's of using Access as the database are drawing to a close but I'm more of a hobbiest programmer and this will be my first attempt to commercialize my hobby.  If I had a good reference to setting up a database server on a local machine I might give it a whirl but without a really good reference it's just to much research in the time I have available.  Even trying to determine what would be the quickest and easiest to learn is difficult.  
I'll take a look at your approach and see how it works out.  I just assumed since this is not a mission critical app it would be best to make it available to everyone.  Assumptions do get us in trouble.
0
 
Jacques Bourgeois (James Burger)PresidentCommented:
There is an alternative that might work, but since it is under Program Files, I am not sure the user will have to right to write to it. Unfortunately, I have to go in a few minutes and do not have time to check.

Have you tried Common Files. Plant Data
0
 
Jacques Bourgeois (James Burger)PresidentCommented:
Installing a database server is now very easy if you to the SQL Server Express route. It lacks some of the features of the "big" SQL Server, but is adequate for most jobs... and its free. It integrates in Visual Studio and you can create, test and even use your database directly from the Server Explorer in Visual Studio.

This is what we use in most of the classes where I give my ADO.NET course. We rebuild the computers for each group of students, and we decided to go the SQL Express route because of its ease of installation. For the professional programmers that take my courses, they do not see the difference, since most of the options important for programmers are there. For hobbyists, that gives them an easy way into a database that is more powerful and around which the whole .NET system was built.
0
 
MoedAuthor Commented:
Does it have a front end so I don't have to learn command line.  What about deployment.  I've looked at it a couple of times and thought deployment must be a real pain.  
Don't happen to teach anywhere around Indianapolis do you...?
0
 
MoedAuthor Commented:
Tried the common files approach.  Not enough user rights.  Tried creating a folder in C:\, no go.  What a pain.
0
 
MoedAuthor Commented:
James,

Thanks for the input.  To bad my French is non-existent.  Mixed feeling on the whole security issue.  I just noticed MS has a new database product out "LocalDB" that appears to be the answer to people like me that don't want the complexities of sql server.  

Thanks again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.