Solved

Exe file description

Posted on 2004-10-29
417 Views
Last Modified: 2008-01-09
Hi,

Is there any way to change EXE file description ? Something like Windows API maybe ?
When you right click an exe file and display the properties, you will read its description.

Thanks
0
Question by:muis2002
    8 Comments
     
    LVL 8

    Expert Comment

    by:mnashadka
    To do this, you need to add Version information to your document.  If you're using Microsoft Visual C++, you can just do an "Add Resource" and select Version in the add resource dialog box.  The steps to do this are a little different depending upon which version of Visual C++ you have and which type of project you have.  Then you can put the description that you want to show up in the "FileDescription" section of the version.  Hope this helps.
    0
     

    Author Comment

    by:muis2002
    Yes, I know that. I made the exe my self. But my question is, is there any way to CHANGE it? Using external application I meant.
    0
     
    LVL 8

    Expert Comment

    by:mnashadka
    It has to be built into the exe.  You can't change it externally.  If you made the exe yourself, why can't you add the resource and recompile it?
    0
     
    LVL 86

    Expert Comment

    by:jkr
    Win32 has 'UpdateResource()' that can be used to change any resource. You can also open the .exe file in Visual Studio, all you nedd to do is selcting "Resource" in the "Open as" combo box.
    0
     
    LVL 55

    Expert Comment

    by:Jaime Olivares
    Must be programaticaly?
    If you just have to change some info about Version Resource, use Visual C++, open .exe file **as resource**, all resources of file will appear, including version resource, then you can change it and save again.
    0
     
    LVL 55

    Expert Comment

    by:Jaime Olivares
    If you want to update it programatically, read this article:
    http://www.codeproject.com/samples/UpdateVersion.asp
    0
     

    Author Comment

    by:muis2002
    Thanks for the information. But I cant find any information about how to change the DESCRIPTION (not the file version).
    0
     
    LVL 55

    Accepted Solution

    by:
    Description is an item of file version.
    Follow the codeproject's sample
    After GetFileVersionInfo, use VerQueryValue() to obtain '\VarFileInfo\Translation' value. Store translation in a structure like this:
          struct translate
          {
                WORD languageId;
                WORD characterSet;
          } Translation;
    Now use VerQueryValue() again to obtain 'VarFileInfo\xxxx\FileDescription' where xxxx is translation ids.
    Read more at GetDynamicInfo() in this sample code:
    http://cvs.sourceforge.net/viewcvs.py/audioscrobbler/wa2plugin/VersionApp.cpp?rev=1.1&view=markup

    MSDN info:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/versioninformation/versioninformationreference/versioninformationfunctions/verqueryvalue.asp

    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

     Java Android Coding Bundle

    Whether you're an Apple user or Android addict, learning to code for the Android platform is an extremely valuable, in-demand skill. It all starts with Java, the language behind the apps and games that make Android the top platform it is today.

    Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
    Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
    The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

    875 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

    7 Experts available now in Live!

    Get 1:1 Help Now