Launching Hidded .exe

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to launch 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
embedding the exe in my program, but I don't think that's going to work.
 
Mike,

Is there a reason that you need to run it in another process? Why not
just have internal types in your assembly and call the methods on those?
You can even do it in another thread if you want it to be asynchronous.

Hope this helps.
 
I don't have the source for the application I want to launch, just the
executable.

Nicholas Paldino said:
Mike,

Is there a reason that you need to run it in another process? Why not
just have internal types in your assembly and call the methods on those?
You can even do it in another thread if you want it to be asynchronous.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Mike Gurba said:
I would like to launch 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
embedding the exe in my program, but I don't think that's going to work.
 
Kind of a hack, but you could name the executable something .Dat then copy
it to a temp area as exe, use it, delete it.

Chris

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

Nicholas Paldino said:
Mike,

Is there a reason that you need to run it in another process? Why
not
just have internal types in your assembly and call the methods on those?
You can even do it in another thread if you want it to be asynchronous.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Mike Gurba said:
I would like to launch 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
embedding the exe in my program, but I don't think that's going to
work.
 
Hi Mike,

One way that comes to mind to accomplish this would be to deny all users
access to the directory where the .exe is located with the exception of one
user. When someone uses your application use Impersonation to impersonate
the user that has access to the directory (with the exe in it) and then use
the System.Process class to start the .exe.

Good Luck
-------------------------
 
That's what I'm leaning towards right now, thanks for the response.

Chris said:
Kind of a hack, but you could name the executable something .Dat then copy
it to a temp area as exe, use it, delete it.

Chris

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

Nicholas Paldino said:
Mike,

Is there a reason that you need to run it in another process? Why
not
just have internal types in your assembly and call the methods on those?
You can even do it in another thread if you want it to be asynchronous.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I would like to launch 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
embedding the exe in my program, but I don't think that's going to
work.
 
Is it possible to set all of this up automatically from the install program?
We wouldn't be able to go to each workstation and change permissions and what
user the program opens under. Thanks for the suggestion, it will probably a
combination of something like this and some other stuff.
 
Back
Top