Solved

Explain on the apps folders created when installing a VB 2005 Published apps

Posted on 2012-03-12
21
265 Views
Last Modified: 2012-04-06
We have around 5 apps that are published to a specific folder and the installs are done from these folders.

We would like an explanation of the crazy names created by the installs and how can identify them by the apps installed.

When installed, the setup creates the apps folder in

C:\Users\UserName\AppData\Local\Apps\2.0\ANPR15OG.KTP\00AQEAEP.2L7

within this folder, a series of apps folder are found (see pic)
0
Comment
Question by:rayluvs
  • 11
  • 7
  • 2
21 Comments
 
LVL 53

Assisted Solution

by:Dhaest
Dhaest earned 144 total points
ID: 37713227
On windows Vista and Windows 7, you will find the ClickOnce cache here: c:\users\username\AppData\Local\Apps\2.0\obfuscatedfoldername\obfuscatedfoldername

On Windows XP, you will find it here: C:\Documents and Settings\username\LocalSettings\Apps\2.0\obfuscatedfoldername\obfuscatedfoldername
0
 

Author Comment

by:rayluvs
ID: 37713242
forgot the pic that shows the apps located at C:\Users\UserName\AppData\Local\Apps\2.0\ANPR15OG.KTP\00AQEAEP.2L7
PublishedFolder.jpg
0
 

Author Comment

by:rayluvs
ID: 37713243
I see the folders, but can you explain?
0
 
LVL 53

Assisted Solution

by:Dhaest
Dhaest earned 144 total points
ID: 37713246
ClickOnce does not create a standard application folder under "Application Data" by company/app/version as an .MSI does.  Instead it creates a new /apps subdirectory and wierd-ass directories under it.  I was looking for the dataset and other files I knew the app created and stored clientside.  I found them here.

C:\Documents and Settings\dburke\Local Settings\
Apps\Data\91A59NVB.N3E\OC1PJMO5.GHJ\
wins..tion_401287f9b5ed6594_0001.0000_249b47c6ed474c15\Data

(You cant change that location. It is installed in the Application Cache and there is no way you can install it to some other folder directly by using ClickOnce. You could write an exe to copy files from that folder to where you want but I havent really tried it out. So not sure whether it will work or not. It sure would create problems if you have some optional files though.)
0
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 356 total points
ID: 37713413
This the way ClickOnce works. Once you decide to deploy your applications through ClickOnce, you accept the fact that by gaining an easy way to update your applications, you lose some control on how the installation works.

Microsoft had something before ClickOnce called One-Step Deployment. It was a mess. I think that they learned from the problems and simply designed something that prevented them.

ClickOnce always keep at least 2 copies of the application, the current version and the previous one in case you would want to rollback. Each user has its own install, so Program Files does not fit the bill. It needs to have a way to deal with 2 applications from different sources that could have the same name. It has to synchronize things between the server and the computer that runs the application.

I have never seen an explanation of what those directories and file names mean. As far as I can tell, they are randomly generated on each install and are managed through some internal database used by the ClickOnce system.

I find that thing good in some way, because users usually shy away from such names, specially when they have to navigate many sub directories. They are thus a lot less prone of going in there and break an installation by messing with the files that were distributed.
0
 

Author Comment

by:rayluvs
ID: 37714329
So there is no way of identifying the folder with the actual apps installed? We have noticed that the beginning of the folder has some sort of  among sequence of he apps  it it still kind of difficult to follow.

Please advice
0
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 356 total points
ID: 37715491
I have looked hard at some point to find information about those, but was never able to get to anything.

The manifests directory is the one used by ClickOnce to synchronise between the server and the station.

You can say that the directory with ..tion is the application install directory and that if you have 2 of them then the older one is the rollback version. That a .exe has a double of some of the files in the ..tion for some reason. The same way there is a double of the distributed dlls in the directory where there is no "extension", with an accompanying ..rces that contains the resources for the dll.

But all of this has no real use, specially if you update the application often.

The name of the 2 directories that lead to those (ANPR15OG.KTP\00AQEAEP.2L7 in your original question) is different on each computer and for each user. So is what looks like some kind of GUID after the name of the application such as jbflow_581508cacf0c3272_0001.0005_none_97f7132a2e8ec31e. This one changes for each computer/user and after each publish, and does not even match the one used for the manifest entry.

My feeling is the following. Because of the way the stuff is installed, from an outside source, there are security issues. In fact, before framework 3.5, you could not publish an application that did not have a strong name (digital signature). That caused problems for some, so they let go of that requisite. Usually, when there is a security issue, you let the administrator do the install. This does not fit well with the reason behind ClickOnce that is to ease the update of applications. The way things have been evolving with .NET and Windows, the user is less and less able to work somewhere else than the Users directory if he is not administrator of his station, so they decided to install ClickOnce applications there instead of Program Files. But then, on end up with security issues because any program can work in the Users directory once the user is logged in.

I thus suppose that they decided on that strange naming in order to fool possible threats from outside. Only ClickOnce can make changes or update a ClickOnce application.

Now, if you really want to have more control over what ClickOnce does, you can customize it somewhat with the classes in the System.Deployment.Application namespace. I have never used that, so I do not know the level of intervention you could have in there.

If you have a reason why you would need to know the application directory, tell us what it is, we might be able to provide you with a way to do it even without knowing the directory.
0
 

Author Comment

by:rayluvs
ID: 37720761
Yes, I have noticed the manifests folder, but never understood it until now..

You have shed some real light here.  We have reviewed our folders with your entry and understand it a little bit more.

As to more control over what ClickOnce; yes, but only to have it installed in a specific folder we want and to have somehow a references within a table that we can followup on the installs and folders.  Basically that it.  If you have any comments on this, greatly appreciated

Lastly, and to close the question, we notice that when we right-click the actual Shortcut, it doesn't send us to the strange folder-naming destination, only to the Desktop.

Is there a way to follow the shortcut actual strange folder-naming destination?

Again, thank you very much for this very informative answers.
0
 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 356 total points
ID: 37720880
I supposed that you could always create a shortcut that goes directly to the installed .exe, everything is there. But you would simply lose the advantage of working with ClickOnce.

Maybe you do not understand what Publish does. It is the framework by which you use ClickOnce, a tool that enables applications to update themselves. When the user clicks on the shortcut, it does not starts the applications. It goes for the manifest, compare it to information that is on the network or the web site, determines if the application needs to be updated and triggers the update if needed.

If you create a direct shortcut, you do not use that mechanism. In such a case, there is no reason to use ClickOnce to install applications you would be better create standard Windows Installer installation.

A standard Windows Installer installation is a .msi file, that the user typically installs with a small Setup application. It usually installs the application in Program Files, but offers the choice of any location you might want. If you do not need the auto update feature of ClickOnce, this might be what you need. It offers a lot more options than ClickOnce.

You can easily create that type of installation by going to File...New...Project...Other Project Types...Setup and Deployment.
0
 

Author Comment

by:rayluvs
ID: 37721380
Understood.

Thanx

What abou if there is a way to follow the shortcut of the apps yo the actual strange folder-naming destination?
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 40

Assisted Solution

by:Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger) earned 356 total points
ID: 37721508
With the path being different for each user/machine and changing for each publish? I would forget it.

You have to choose.

Either you Publish and have an application that updates automatically but with almost no control on what happens during installation.

Either you control everything by using more standard method of installation but they you have to design a method to distribute and install updates.
0
 

Author Comment

by:rayluvs
ID: 37721529
Understood, but being one PC and One User, is it possible to right-click and follow the shortcut of the apps to the actual strange folder-naming destination?
0
 
LVL 40
ID: 37721719
Probably, but you will have to recreate the shortcut everytime you publish, because the installation directory changes name on each publication.
0
 

Author Comment

by:rayluvs
ID: 37729648
The purpose of the question is to know the location without going into the strange "Parent" folder and deciphering which is the folder the apps is coming from.

The ends of this question placed is actually that, how to know actual folder of shortcut.

At least if we could know that.
0
 

Author Comment

by:rayluvs
ID: 37758289
Please advice on wow can we know the location without going into the strange "Parent" folder and deciphering which is the folder the apps pertains to?
0
 
LVL 40
ID: 37774358
It seems to me that the answer has been given.

You can't.
0
 

Author Comment

by:rayluvs
ID: 37776761
But in ID: 37721719, is indicated "Probably" making us understand that it is possible and that the EE has done it.  That is why we wanted to know.

Maybe the EE has some techniques he/she can share.
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 356 total points
ID: 37777628
Thanks for bring back that one, it triggered a new line of thought and I am probably in better shape today, I might have found the solution to your problem.

The shortcut point to the directory on the server where the installation files, not to the resulting installation directory. In the different files, on both sides, server and workstation, there is no indication of where the application is installed. The system has to look somewhere else to retrieve the information.

And it jumped in my face. I don't know why nobody thought of it. Probably because we lost the habit of looking there, since .NET does not use that thing as much as COM does.

In the Windows registry, under HKEY_CLASSES_ROOT\<ApplicationName>\shell\open\command.

There it is, in plain sight, for all to see.
0
 

Author Comment

by:rayluvs
ID: 37779802
Really?  Just left the office, will check tomorrow

Thanx!!!
0
 

Author Closing Comment

by:rayluvs
ID: 37817532
thanx All
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now