473,396 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Launching Hidded .exe

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.

Nov 16 '05 #1
6 1348
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]
- mv*@spam.guard.caspershouse.com

"Mike Gurba" <Mi*******@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
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.

Nov 16 '05 #2
I don't have the source for the application I want to launch, just the
executable.

"Nicholas Paldino [.NET/C# MVP]" wrote:
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]
- mv*@spam.guard.caspershouse.com

"Mike Gurba" <Mi*******@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
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.


Nov 16 '05 #3
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" <Mi*******@discussions.microsoft.com> wrote in message
news:54**********************************@microsof t.com...
I don't have the source for the application I want to launch, just the
executable.

"Nicholas Paldino [.NET/C# MVP]" wrote:
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]
- mv*@spam.guard.caspershouse.com

"Mike Gurba" <Mi*******@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
>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.
>


Nov 16 '05 #4
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
-------------------------
Nov 16 '05 #5
That's what I'm leaning towards right now, thanks for the response.

"Chris, Master of All Things Insignifican" wrote:
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" <Mi*******@discussions.microsoft.com> wrote in message
news:54**********************************@microsof t.com...
I don't have the source for the application I want to launch, just the
executable.

"Nicholas Paldino [.NET/C# MVP]" wrote:
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]
- mv*@spam.guard.caspershouse.com

"Mike Gurba" <Mi*******@discussions.microsoft.com> wrote in message
news:9D**********************************@microsof t.com...
>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.
>


Nov 16 '05 #6
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.

"Brian Brown" wrote:
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
-------------------------

Nov 16 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Bob | last post by:
Hi, I'm trying to build a PHP page which launches another php script to be run in the background. The web page should return immediately, while the background script may run for 10 minutes or...
0
by: Hegemony Cricket | last post by:
I've found several good examples out there on how to launch a web browser from a Java application, using the Runtime exec() command. However, what I'd like to do is configure the browser that's...
2
by: Terry | last post by:
When launching our application with Internet Explorer already opened, but not pointing to our web server, the session variables disappear. If you open I.E. after launching our app, it works fine....
6
by: JerryP | last post by:
Hello, is there a way to launch the property dialogue for a directory from my c# app ? I would also like to launch the User Account Properties from Active Directory Users and Computers, and the...
0
by: Scott Zabolotzky | last post by:
I'm using the following code to launch SIGNCODE.EXE to sign a CAB provisioning file from an ASP.NET app. When I run the code the exit code comes back as -1. I have not been able to determine what...
24
by: Alan M Dunsmuir | last post by:
What is the command (in Windows Forms VB.NET) which will cause the subject computer's default browser to launch, and display a specified Web page? -- Alan M Dunsmuir
8
by: VA | last post by:
I have a report that is accessible by a URL. How would I go about automating the launching of this URL using, say, a batch file? I can put start iexplore.exe "http://my.url" in the .bat...
7
by: dhussong | last post by:
I have created a Setup and Deployment project in Visual Studio.NET 2003. After my installation has completed running I'd like to launch the EXE that I just installed. I've found how to launch the...
1
by: John A. Bailo | last post by:
Excuse the novice aspects of this question, but: What techniques are available to me for launching one c# application ( console .exe) from another? For example, I know there is the Process and...
0
by: microb0x | last post by:
Is there any difference in the way an Access .mdb file is launched from directly double-clicking the file through windows explorer versus using code within another Access file to launch the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.