We have programs in VB6, VB.Net 2005, 2008 and 2010.
Some of the VB.Net programs were converted from VB6 using the VB.Net converter (Just open the VB6 project).
All this is fine until yesterday.
We uninstalled a program written in VB.2010 via the control panel. Went fine. But now other programs, VB6, VB.Net 2005 and 2008 are having problems. Now have compile errors and reference errors.
We fixed the first. MSFLXGRD.OCX become unregistered (not deleted). Not sure why. We registered it and that fixed some problems.
I am not sure why reference to dlls in other program source bin folders were removed. Adding the reference to these fixed them.
Now in 1 of our 2008 programs we have an Undeclared MSXML2.XMLHTTP in
Dim pXMLHTTPObj As New MSXML2.XMLHTTP
This is on Win 7/64 Pro.
If we open the same programs on another machine from the same folder there are no errors. So probably another unregistered dll. (XP)
This program has a reference to
Microsoft XML, V4.0
which is in the obj\bin\debug folder (it is there) and adding it seems to have fixed that also.
I am now very fearful of uninstalling anything.
Can someone please explain what is happening and how I can safely uninstall????? PLEASE!!!!
It screws up because controls are not registered on a per-application basis. Controls are registered using the COM GUIDs in the controls and the registration is stand-alone. The controls can be used in any application anywhere.
If you have multiple copies of the same control, the control is only registered ONCE since each copy has the same GUIDs and CLSIDs. The filepath to the control is also part of the registration. So, if you have an application that uses the same controls as another application and your installer, when uninstalled, removes the registration details when it removes the controls, the registration data is destroyed for the control no matter how many copies of it are on the machine.
The problem comes down to how your installer is built. The Setup project that comes in Visual Studio is a barebones installer that doesn't have a ton of features in it and can do some pretty stupid things. If you trust it implicitly, without knowing how it's doing things or why, problems like your will come up.
I highly recommend studying Windows Installer technology (specifically Shared Components and reference counting) and using a 3rd party packaging solution, like InstallShield, InnoSetup, Advanced Installer or WiX if you want to avoid situations like this in the future.
Try Save and Close your project, then go out to the project folder and delete the *.SUO files. You'll have to enable viewing hidden files in Explorer to see it. Then reopen your project and see what happens.
In researching this it seems that the problem even exists with the 3rd party installers unless a lot of work is done first.
So if a lot of work must be done why not just do it with the VS.Net Deploy and Setup project, etc. instead of learning another component.
But it is not clear where to look for the proper documentation to know what to do.
We if have a vb.project that has 30 screens with code behind and another 40 or so modules it is a bit tough to know what to do.
Is the solution in the references or the setup dependencies, etc.?
I've seen discussions of have different dlls which is unclear how to do it with the vb components and ocx modules, etc. both for MS VS stuff and also other SDKs, etc that we are using. I don't think that renaming DLLs will work.
So where to begin? What is the best practises for setup and deployment?
This has been causing us nightmares and we are ready to bit the bullet if we knew where the bullet was.
The reason you're in this position is because you don't understand how Windows Installer works. So you're going to have to learn this no matter what.
So if a lot of work must be done why not just do it with the VS.Net Deploy and
Setup project, etc. instead of learning another component.
Because you have no choice. The Deployment and Setup project no longer exists in Visual Studio 11 and it's capabilities are very limited to begin with. You have to use a 3rd party tool, such as InstallShield LE, or InnoSetup, or AdvancedInstaller, ...
Either way, you're looking at a bunch of work to DO IT CORRECTLY IN THE FIRST PLACE!
We if have a vb.project that has 30 screens with code behind and another 40 or
so modules it is a bit tough to know what to do.
The number of forms you have in your application has no bearing on the installer at all. The complicated part comes in when you start referencing external components and libraries. You have to KNOW what you're referencing, how they works and what their installation requirements are.
Coming up with an installer is not just a "OK my app is done now throw an installer together" process. Installers are another program you write SIDE-BY-SIDE with your application so that the installer knows what your app is using and how to correctly install every file, in every component, in every feature, what merge modules are, why they exist and how to use them, ...
I don't think that renaming DLLs will work.
No, it won't.
This has been causing us nightmares and we are ready to bit the bullet if we
knew where the bullet was.
You're writing application in the dark. You have no idea how the components in your app fit together nor how external libraries work, how they are registered or why, and how your installer has to handle these things. If you don't know these things, you can't just throw files anywhere you like and expect everything to work fine.
Hi I want to know how to store data in one file with my own extention. sorry I have no code because I'am a looooooooser
so pleaaaasee help me with a project sample
and pleeeaaase let me know how would my program reads these files to use them. how
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
"Use a zip file and change the extension"
That does not help you? That is quite a common way nowadays.
Ever tried it the other way round, with say a .docx? Do that! Rename a Word document to a zip file, and unzip it!
That's no way to introduce yourself. You got the same type of brain that I have, and you probably run on water and sunlight like the rest of us.
Use a database (like SQL CE or SQLite), encrypt the contents and rename the extension to ".dat". Use a folder, zip it and rename the zipfile to ".dat". Use an Xml file, and store the other files in Base64-encoding, and rename it to ".dat".
Let's start simple; can you post the code here to write the line "Hello world" to a file? If not, that's where to start
If you want to do it through your own code, use a FileStream to read the files into memory and another to write them to the same file. FileStreams read the raw bytes of the files. You'll want to put some sort of delimiter between the files so you can separate them later. To add your delimiter to the file, create a string and then use System.Text.Encoding.Ascii.GetBytes(YourStringVariable). That will give you a byte array with which to write with the filestream's write method.
Hope that wasn't too confusing!
PS: If you want to compress your files, there are lots of examples for compressing files in .NET, just search google for "compression vb.net"
I have a question about how to do the following and the pros and cons about doing either.
I have a class that I want to be able to log some activities, such as "function has been called". I could define an event call CurrentInfo(byval infoType as Integer,byval message as String), and then let the logger subscribe to the event and do whatever, or I can pass a logger to the class and whenever I wanted to log something I will call "logger.log(infoType, message)"
That depends on your definition of "better". I'm using an ILogger, sometimes writing to console, sometimes to the eventlog, and a null-implementation of the ILogger (doesn't log anything). The logger-object is static, so it doesn't need to be passed as a parameter to each and every method.
Might not be the "best" approach, but works for me
Thanks for the answer. I know it's relative and is different from one to the other scenarios. I found that, as you said, if I don't need a logger from time to time I will have to pass a null logger to the class. Yet event can be hooked up dynamically as needed.....I really want to know is there a big PLUS to use logger instead of using events. Thanks
I was woundering if anyone knows any codes for a Rehash and Resign Program? It might have.... 2 buttons or 3 if it will have rehash and resign as one button then rehash as a button and resign as a button.
it should have atleast 5 textboxes ....
Last Visit: 31-Dec-99 18:00 Last Update: 10-May-21 13:07