3 Replies - 6191 Views - Last Post: 30 May 2011 - 05:51 AM

#1 ghillieLEAD  Icon User is offline

  • D.I.C Head

Reputation: 31
  • View blog
  • Posts: 208
  • Joined: 08-March 10

Reference An .exe, Distribution Question Related To Referenced .exe

Posted 28 May 2011 - 06:44 PM

In my project I am referencing a certain .exe file. Is it possible for me to distribute my application without the referenced .exe and require that the user running my apllication have the referenced exe be installed on their local machine prior to running my application?

This post has been edited by ghillieLEAD: 28 May 2011 - 06:44 PM

Is This A Good Question/Topic? 0
  • +

Replies To: Reference An .exe, Distribution Question Related To Referenced .exe

#2 Amrykid  Icon User is offline

  • 4+1=Moo
  • member icon

Reputation: 148
  • View blog
  • Posts: 1,589
  • Joined: 16-December 08

Re: Reference An .exe, Distribution Question Related To Referenced .exe

Posted 29 May 2011 - 06:28 AM

Well, chances are, if you require a exe and the exe doesn't exist on the user's machine, it will not run (or it would throw an exception).

You should check if the program is installed and if not, ask the user to download it. That way, you don't have to distribute it with your app and you will know if they have the exe or not.
Was This Post Helpful? 1
  • +
  • -

#3 ghillieLEAD  Icon User is offline

  • D.I.C Head

Reputation: 31
  • View blog
  • Posts: 208
  • Joined: 08-March 10

Re: Reference An .exe, Distribution Question Related To Referenced .exe

Posted 29 May 2011 - 09:28 AM

How do I do that though? Is there a tutorial you know of or an example you could give me? I would appreciate it so much. :)

Just in case anyone needs some more info to explain this, my application is a mod for a game. In my project I reference the game .exe. Obviously I don't want to be distributing the game with my project, as that would be illegal, and after a chat with the game developers they would only be ok with a mod that does not distribute their .exe, or alter their source code.

A little bit of a code exaple:

public class ModMain : Terraria.Main
{

    protected override void Update(GameTime time)
    {
        if (chatMode)
        {
            // more code, you get the idea
        }
        
        base.Update(time);
    }

}


This post has been edited by ghillieLEAD: 29 May 2011 - 09:48 AM

Was This Post Helpful? 0
  • +
  • -

#4 Amrykid  Icon User is offline

  • 4+1=Moo
  • member icon

Reputation: 148
  • View blog
  • Posts: 1,589
  • Joined: 16-December 08

Re: Reference An .exe, Distribution Question Related To Referenced .exe

Posted 30 May 2011 - 05:51 AM

You would have to use File. or Directory.Exist and check if it exist in the program files directory. A better way is to look through the registry because when programs are installed, there's usually a key in the registry about it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1