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. 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.
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.
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. >
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, 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. >
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 ------------------------- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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....
|
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...
|
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...
|
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
|
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...
|
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...
|
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...
|
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...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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,...
|
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...
|
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,...
|
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...
|
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...
| |