Dear All,

I have done a project in VBasic 10.0 for our product Design.

Unfortunately the program was deleted while re-installing the OS.

However we have managed to retrieve the files by using File Recovery software.

But now the .EXE file is working but the Vb program file is corrupted.

Please suggest an idea to retrieve the Vbcode from the program file or from the EXE File..



9 Years
Discussion Span
Last Post by Jupiter 2

The short answer is NO.

You will need to reverse-engineer the program and nobody knows how to do that. This is why Visual basic is so popular.


To begin with VBasic 10 would be VB.NET...
Second, Jupiter 2's reply is not entirely correct...

There are out there programs that "say" they can reverse engineer programs, i.e. decompile programs and while they are capable of doing such things, the result is less than readable. For each sub/function/property/event etc. there will be an identifier something like A123_57(a_,B_,C_) A1 and while you will be able to read basic logic structures (If, Do, For, Select) the variables will be just as unreadable as the proceedures.

Good Luck


You will have to rewrite the program. I 've rewritten many programs because sometime I forget something and a few months later I might want to change things.

Nowadays, I copy and paste all the modules text to a text file The Project and vbp, and text file are copied to a flash drive. When I get a reasonable amount of projects and data, I burn it to a Data CD.

The more you redo a project, the more things you think of to make the project better.

As to the request, at best, you can right-click the exe and view in notepad or wordpad or any text editor. You don't get the routines, only the names of the objects.

I burn all my projects to a data CD.


Thanks for the reply,

Actually in my case i' not only have the .EXE file but also the Vbprogram file.

While opening the file, it shows the following error.

Unable to read the project file 'xxxx.vbproj'.

D:\xxxx.vbproj(1,1): The project file could not be loaded.
Data at the root level is invalid.line 1, position 1.

Is this error can be solved?


Try opening it in Visual C++

Do you have the Full Version of Visual Studio? If so there are tools that might help, location in Start Menu >All Programs > Vsual Basic 6 > ...
Also, was the program written in a later version than what you have now to open it?


Well, unfortunatly Jupiter 2, elanch is using one of the .NET variants (2k2, 2k3, 2k5, 2k8, and soon 2k10).


If I remember correctly, the vbproj file is an XML file and if I am correct you should be able to open it up with Notepad. The only one good thing that I can think of is that the error message has given you the place to look. Open up another *.vbproj file and the one giving you problems and see what is missing/wrong/etc...

Okay, just confirmed that it is an XML file (I have 2k8 Pro) and a blank form project looks like this...

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="System.Core">
    <Reference Include="System.Xml.Linq">
    <Reference Include="System.Data.DataSetExtensions">
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Collections" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.Data" />
    <Import Include="System.Drawing" />
    <Import Include="System.Diagnostics" />
    <Import Include="System.Windows.Forms" />
    <Import Include="System.Linq" />
    <Import Include="System.Xml.Linq" />
    <Compile Include="Form1.vb">
    <Compile Include="Form1.Designer.vb">
    <Compile Include="My Project\AssemblyInfo.vb" />
    <Compile Include="My Project\Application.Designer.vb">
    <Compile Include="My Project\Resources.Designer.vb">
    <Compile Include="My Project\Settings.Designer.vb">
    <EmbeddedResource Include="My Project\Resources.resx">
    <None Include="My Project\Application.myapp">
    <None Include="My Project\Settings.settings">
  <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  <Target Name="AfterBuild">

so see what is wrong and correct the file and save.

Good Luck


It seems you will just have to rewrite the entire project file., perhaps using the info provided by VB5prgrmr.

"You can never escape a rewrite. It's what we all have to do, eventually."

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.