Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 15th, 2005, 07:10 AM
Registered User
 
Join Date: Mar 2005
Location: Bangalore, Karnataka, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to identify that a given exe is manage code

How to identify that a given exe is manage code also if the given exe is manage then how to find its version.

Shiby Chacko
Reply With Quote
  #2 (permalink)  
Old April 15th, 2005, 12:07 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

you can't open them with IL Disassembler,
Code:
//for the version
textBox1.Text=Assembly.GetExecutingAssembly().GetName().Version.ToString();
//in generally(i.e for copyright info)
foreach(object o in Assembly.GetExecutingAssembly().GetCustomAttributes(true))
    if (o is System.Reflection.AssemblyCopyrightAttribute)
        {
                    System.Reflection.AssemblyCopyrightAttribute at=o as System.Reflection.AssemblyCopyrightAttribute;
                    textBox1.Text=at.Copyright;
        }
//...
_____________
Mehdi.
software student.
Reply With Quote
  #3 (permalink)  
Old April 16th, 2005, 10:49 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Shiby,

I suppose you could use the methods in .NET to load an assembly from the filename. I would imagine that if you attempted to load a non-managed assembly .NET would throw an exception telling you that. Otherwise it would load, and you could then use Reflection to interrogate the assembly for its version number.

-Peter
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i code to download an exe file??? RinoDM HTML Code Clinic 1 May 25th, 2008 05:16 PM
VB: .Exe file, serial code and activation code ivanlaw Pro VB 6 8 July 6th, 2007 05:44 AM
make Exe out of VBA code roli2712 Excel VBA 2 July 4th, 2007 02:06 AM
Click even code for open DOS .EXE mohiddin52 Access VBA 4 October 18th, 2006 12:20 PM
can i run exe file from c or c++ code shafiq_77 C++ Programming 7 April 19th, 2005 10:08 AM



All times are GMT -4. The time now is 07:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.