Launching Hidden Executable

G

Guest

I would like to laucn an application from a C# program, but I don't want
users to be able to launch the app themselves. The only way to run the
program should be to launch it from my C# application.I have looked at
ebedding the exe in my program, but I don't think that's going to work.
 
J

Jako Menkveld

Try passing some obscure command line argument, like an encrypted string.
If a user tries to start the app without it (or with an invalid one), just
don't let it start.
 
G

Guest

I don't have the source code for the application I want to launch, just the
..exe.
 
J

Jako Menkveld

That might complicate things a little, sorry, I'll have to think about this
a little more...
 
F

Fredrik Wahlgren

Mike Gurba said:
I don't have the source code for the application I want to launch, just the
.exe.

Can the application be launched using COM? Some programs have properties
which tell how they were started. Can you tell us more about the exe? Do you
know who wrote it?

/Fredrik
 
G

Guest

It's a .Net app, I have access to older versions of the source, but not the
final release. I'm not sure if that aswers your question, I don't think I
understand what you're talking about.

Thanks
 
F

Fredrik Wahlgren

Mike Gurba said:
It's a .Net app, I have access to older versions of the source, but not the
final release. I'm not sure if that aswers your question, I don't think I
understand what you're talking about.

Thanks

I was thinking about applications like MS Word. I think it has this kind of
property. One thing you can do is to make the application file invisible.
That should make it difficult for most users to double click it.

/Fredrik
 
P

Peter Chadwick (MCP)

Hi,

Have you dismissed embedding the program completely? It sounds like it
could be a good option; especially if you don't have access to the
source off the app you want to call to put security options in it.
From what you are saying I would personally go for embedding the
program, extract and run it when necessary, and have a function which
runs whenever your program ends (and/or when it's done with the .exe)
which deletes it again.

I don't know how much you have looked into embedded resources, but this
link is a starting place:

http://msdn.microsoft.com/library/d...tml/vbtskaddingresourcestoyourapplication.asp
Regards,

Peter Chadwick (MCP)
(e-mail address removed)
 

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