how to set a assembly's properties without the use of a GUI

M

Marcus

I want to set the Description of my .exe file (it is a .NET
assembly).
You know that description that is seen in Windows Task Manager process
tab. Almost every running process has got one. They can be a whole
sentence explaining what the process is about.

I need a way of setting this description of my .exe without any GUI. I
need it to be set from a command line tool or something alike.

Is there a tool like that? Maybe something built into Windows?
 
M

Mint

I want to set the Description of my .exe file (it is a .NET
assembly).
You know that description that is seen in Windows Task Manager process
tab. Almost every running process has got one. They can be a whole
sentence explaining what the process is about.

I need a way of setting this description of my .exe without any GUI. I
need it to be set from a command line tool or something alike.

Is there a tool like that? Maybe something built into Windows?

That information is stored in the executable.

For example in assembly language, a resource file like this is used.
Your programming language should have something similar.

#define APP_VERSION_INFO 1 // {{ define at the top your .RC
file }}

// example version resource
APP_VERSION_INFO VERSIONINFO
FILEVERSION 1,1,0,0
PRODUCTVERSION 1,1,0,0
FILEFLAGSMASK 0x17L
FILEFLAGS 0x0L
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
{
BLOCK "StringFileInfo"
{
BLOCK "040904b0"
{
VALUE "CompanyName", "Siege_Works"
VALUE "FileDescription", "Delete Windows XP Temporary
Directories"
VALUE "FileVersion", "1.0"
VALUE "InternalName", "Del_Tmp_Dirs"
VALUE "LegalCopyright", "© Quality Home Repairs"
VALUE "OriginalFilename", "Del_Tmp_Dirs.exe.exe"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 1200
}
}
 
M

Marcus

That information is stored in the executable.

For example in assembly language, a resource file like this is used.
Your programming language should have something similar.

#define APP_VERSION_INFO    1     // {{ define at the top your .RC
file }}

// example version resource
APP_VERSION_INFO VERSIONINFO
    FILEVERSION 1,1,0,0
    PRODUCTVERSION 1,1,0,0
    FILEFLAGSMASK 0x17L
    FILEFLAGS 0x0L
    FILEOS 0x4L
    FILETYPE 0x1L
    FILESUBTYPE 0x0L
{
    BLOCK "StringFileInfo"
    {
        BLOCK "040904b0"
        {
            VALUE "CompanyName", "Siege_Works"
            VALUE "FileDescription", "Delete Windows XP Temporary
Directories"
            VALUE "FileVersion", "1.0"
            VALUE "InternalName", "Del_Tmp_Dirs"
            VALUE "LegalCopyright", "© Quality Home Repairs"
            VALUE "OriginalFilename", "Del_Tmp_Dirs.exe.exe"
        }
    }
    BLOCK "VarFileInfo"
    {
        VALUE "Translation", 0x409, 1200
    }



}- Dölj citerad text -

- Visa citerad text -

Yes, there is such a file it is called AssemblyInfo.cs.
I can set the description in this file before I build the exe file.
I need however some way of inject this info into the exe file without
the need to rebuild the exe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top