Reputation: 81
We have stand alone C# desktop application that also uses VB6 code for some logic to write in .md5 file.
Due to windows file and registry virtualization some registry key on some machine do not get values as system redirect the registry reading to some other location in registry. To solve this problem we disabled the virtualization for our application.
That problem has been solved but now we face a new problem related to VB6 code and it is weird. When I run the application through my code base using visual studio(VS15) it works fine event when I run the exe directly from my local code base it works fine but when i run the application through start menu(after install the application) it does not work and give exception that is given below. If I run the application as Administrator it works fine.
The exception i got is from VB6 code:
tvsFilename = tvsReleaseFolder & "\Packages\" & tvsPackageName & ".md5"
tvTextStream = tvFSOCP.OpenTextFile(tvsFilename, Scripting.IOMode.ForAppending, False, Scripting.Tristate.TristateFalse)
Exception from HRESULT: 0x800A0035 (CTL_E_FILENOTFOUND).
I checked the access permission to the location and all the permissions are given to the user.
And if it needs administrator permission the why is is working fine with the code base as i run the exe normally from the code base or Visual studio that is not runnig as administrator. It only happens when I installed application and run normally.
I checked to enable the virtualization again and installed the updated application now it works.
But we have to disable the virtualization for our application to get the right registry location.
I checked to create the dummy text file from the VB6 code with CreateTextFile() function and found that the problem is there in the VB6 code as it works fine with code base but does not work with installed version of application if i disable the virtualization for my application.
I searched many topics but did not find any issue related. Any help would give me the direction to move further.
Upvotes: 1
Views: 240