App.exe.config not being replaced - winforms

I have an application that was shoddily created which resulted in some very sensitive information ending up being potentially very visible within the App.exe.config file after an install. I am presently banging my head against the wall in a thus far futile attempt to delete and replace the .config file via an application update, but all attempts have, as previously stated, proved futile.
My employer is laboring under what I believe to be the delusion that removing the lines in the config file is as simple as writing something into the program that looks at the .config file and deletes them, however 1: I do not think it is that simple and 2: That the file is not being updated with the more recent is indicative of a larger problem that needs to be resolved.
I have tried (in the setup and deployment project) setting the "Remove Previous Versions" to true, and I've incremented both the installer version number and the application version number forward, but neither have worked.
Why is the installed applications app.exe.config not being removed/replaced/updated?

When incrementing your version number make sure you increment at least the third section which is the build number, the fourth section is the revision number which will not force a replacement of the older file. See this MSDN link http://msdn.microsoft.com/en-us/library/aa370859(v=vs.85).aspx
The format is Major.Minor.Build.Revision
From link:
Note that Windows Installer uses only the first three fields of the product version. If you include a fourth field in your product version, the installer ignores the fourth field.

Related

How to dlopen an unknown version of a library

I am trying to load libreadline.so. My code works fine if I give the version number explicitly as in "libreadline.so.6" but fails if I just give "libreadline.so", presumably its just trying to open the file name I give directly. To avoid a future failure when a new version appears, I call dlopen in a loop with the version number counting down to zero. This works and always picks up the latest version of libreadline.
My question is, is there a correct, or better, way of doing this?
I see libreadline.so.6 is a link to libreadline.so.6.3, its a pity they cant have a link from libreadline.so to the latest version.
What about opening the directory which contains all the different files and then comparing the extensions of all files?

Replacing openssl-0.9.8zf with openssl-0.9.8zg causes problems

I am working on a product where its built in two steps:
Step 1:
openssl-0.9.8zf is added as includes for compiling the product, and uses ssleay32.dll and libeay32.dll (of the same version) for linking.
Step 2:
While packaging the product, the above mentioned dlls are replaced with openssl-0.9.8zg version's and openssl.exe file is also added to support another library which loads that in at run time.
However this method is causing problems on which I am not able to lay a finger on. It works perfectly when I use the same version in Step 1 and Step 2. Given that openssl-0.9.8zg is 100% compatible with openssl-0.9.8zf, and that they are dynamically loaded, are there any guesses on what can cause problems?
OpenSSL information on versions: http://abi-laboratory.pro/tracker/timeline/openssl/

why windows installer doesn't use my EmbeddedUIHandler when it is dependent to other DLLs?

I'm trying to handle all of User Interfaces (UI) dialogs in .msi installing pakage, with EmbeddedUIHandler to do this I have created a setupui.dll which contains three methods: InitializeEmbeddedUI, ShutdownEmbeddedUI, EmbeddedUIHandler, and put it inside of MsiEmbeddedUI table (using installshield) and it worked just fine.
The problem is when setupui.dll is dependent to other external DLLs, this time windows installer won't use my dll and it uses default ui, I have added other DLL dependencies with Installshield as follow:
I'm uncertain of what Windows Installer allows here. There are, however, three things that jump out at me as things to look into:
The MsiEmbeddedUI table's Attributes column should probably have a 3 for SetupUI.dll (as it does), and 0 for the rest. Per the docs, the 2 bit is ignored if the 1 bit isn't present, but all the other files are better described as "It may be a resource used by the user interface."
The verbose log: does it indicate what's going on? Does it show a failure loading SetupUI.dll that provides a useful error code (hint: file not found probably refers to a dependency)? Does it indicate it didn't even try to load your DLL? Look for lines with EEUI, at least in the successful case.
If Windows Installer does attempt to load SetupUI.dll, how far does it get? If it gets far enough for you to run some code and, say, show a message box, what files are already extracted at that point? If the dependencies are extracted, can you ensure that its directory is on the DLL path via SetDllDirectory or AddDllDirectory? If the dependencies are not extracted, are they present at a later point so approches like delay loading could help?
For the third point, Process Monitor may help you diagnose what's going on if you can't get a message box in there, but it will probably be less clear. Alternately, using Loader Snaps and Debug View might get you a related set of information, but it may be drowned in additional noise.

Trying to find information on how to build a simple file version controll system

Im want to build a file system for non-tecks( dont care about old versions of the file so no merging or svn/git). The thougt is that a user should be able to download a file, in the same instance the file should be locked for other users. When the first user is done editing the, the file should then automaticaly upload to the server. When he closes the file, the lock should den be opend.
Is this even possible? Im thingking a sort of browser plugin, but I cant find anywone that has done the same thing. (besides microsoft, but who want to go down that road)
That would be: Sharepoint, Alfresco, (almost every WIKI), ...
Actually that is a basic feature of most document management systems. Even SVN has that already and IIRC you can set that up with mod_dav_svn without a line of code (considering configuration is not code).
Also the interesting question is, IMHO, not TheHappyCase where the described unit of work goes well but what about this*:
I Checkout 50 random documents you need
(get some popcorn and wait for your stresslevel to go up)
?????
I get bored and forget about it (everything still being checked out)
*: Points (1) and (2) may change order

Why doesn't checking out in TFS 2010 give me write permissions? It causes an exception in my project at the target of invocation

I just moved my code from subversion to TFS.
When I get latest version, I understand that I can't get write permissions.
However, when I check out and choose the option to take the exclusive lock, a check mark appears next to my files and I am able to edit them.
When I look in Windows explorer, however, some files are still marked "read only."
This becomes a problem when I try and run my application. For some reason, not having write permissions to everything gives me an exception at the target of invocation message (its a wpf project).
When I run the files out of version control, everything is fine. When I run the version under TFS, I get that exception--even when I've exclusively checked the files out.
Any idea what is going on here?
Sounds like quite a bit of confusion here. So i have a number of questions:
Did you specifically check out the files that are still marked "read only"? Or did you just check out other files which may be related to the ones marked "read only".
Did you use the Source Control window or the Solution Explorer when performing the checkout command? Did you select specific files or just the top level project file?
Are the files actually part of the project? or are they simply in the same folder but still under source control?
What exact error message are you getting?
What files are the problem? In other words have you checked in the compiled binaries from the BIN or OBJ folders?
TFS terminology is a little different than SVN.
"Get" represents an update in SVN terms.
"Checkin" commits your changes and both "Checkin" and "Checkout" are responsible for managing file locks.
"Checkin" releases the locks.
"Checkout" requests the locks.
There are 3 types of locking you can use or none at all. I would opt for using None as it's likely to cause the least issues, many of which can be resolved during a merge and a little bit of communication.

Resources