|
-
December 11th, 2007, 05:45 AM
#1
block another program from running?
hi
is there any way we can do using C# to develop an application which can block other program from running? something like firewall program which can block some program from running, unless given explicit permission....
any information is greatly appreciated
thanks
-
December 11th, 2007, 06:16 AM
#2
Re: block another program from running?
Why not have the administrator set-up proper rights for executing application?
Which application is it that you want to block?
-
December 15th, 2007, 09:11 AM
#3
Re: block another program from running?
hmm... i think that's not the most efficient way to solve the problem i'm facing..
i want to block users from running screen capture program...
-
December 15th, 2007, 02:43 PM
#4
Re: block another program from running?
 Originally Posted by imin
hmm... i think that's not the most efficient way to solve the problem i'm facing..
i want to block users from running screen capture program...
Well blocking user from running a program doesn't sound good to me. If you don't want a user to run a certain program get it un-installed. Or as I said proper way of doing this would be to contact administrator.
-
December 15th, 2007, 09:30 PM
#5
Re: block another program from running?
 Originally Posted by Shuja Ali
Well blocking user from running a program doesn't sound good to me. If you don't want a user to run a certain program get it un-installed. Or as I said proper way of doing this would be to contact administrator.
hmm.. i still think the best way for me is to be able to block certain programs.. anyway for the time being let's forget the reason to do this... is there any way to do this??
-
December 15th, 2007, 10:13 PM
#6
Re: block another program from running?
 Originally Posted by imin
hmm.. i still think the best way for me is to be able to block certain programs.. anyway for the time being let's forget the reason to do this... is there any way to do this??
Yes there is a way to do it, and it has already been suggested. Use Windows Security.
That is the one and only valid way to do it. period. Anything else WILL either cause system problems, or be so easily breakable as to be worthless.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
December 15th, 2007, 10:48 PM
#7
Re: block another program from running?
 Originally Posted by TheCPUWizard
Yes there is a way to do it, and it has already been suggested. Use Windows Security.
That is the one and only valid way to do it. period. Anything else WILL either cause system problems, or be so easily breakable as to be worthless.
hmm... isn't there any other way? since some firewall could do this (block programs from running), right?
anyway how do we configure the windows security to block certain program? cause i've never used it before
-
December 15th, 2007, 11:25 PM
#8
Re: block another program from running?
 Originally Posted by imin
hmm... isn't there any other way? since some firewall could do this (block programs from running), right?
anyway how do we configure the windows security to block certain program? cause i've never used it before
1) Firewalls block access to resources. They have NOTHING to do with a program running that is currently on your machine. Of course blocking access to resources may prevent programs from running CORRECTLY.
2) There is a lot of good information available, some of the details depend on the exact version of window your are using. The basic idea:
a) Everybody gest their own account, and NONE of them are adminisrators
b) Groups are created for certain categories
c) File Access security (right click-Security), is use to control exactly who can read/write/execute for every file and directory on your computer.
When this is done properly, then you have a very reliable method of controlling EXACTLY who can do what on your machine.
When my kids were younger (now the youngest is off to college), it took me a few hours to set up each of the machines so they could do only what they were supposed to, did not have access to "things they should not", and could not crash the machine, or install additional programs, or.......
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
December 15th, 2007, 11:31 PM
#9
Re: block another program from running?
My sister has 4 kids, and has had DSL for the past 10 years. The youngest is 10 and the oldest is 14.
Between all of them, the youngest prolly knows the most about how things work. They have never had a problem with kids clicking on inappropriate material.
Sure, it comes up once or twice, discussed, and dropped. Trust.
(We discusssed installing filters, but it would have caused too many problems for the adults to turn on and off. Same with user accounts, much less even having a password! )
-
December 16th, 2007, 01:19 AM
#10
Re: block another program from running?
David, I REALLY have to disagree. Your sister has been LUCKY.
I know personally (not through hear-say, but direct pesonal knowledge of the people) of children who have been CONVICTED of ADULT crimes for posts on MySpace. (ala "I wish ....was dead, I hate him/her).
I am a strong advocate that NO CHILD under the age of 18 should be trusted to the point of stupidity. I know of no responsible parents who would hand their child a bottle of booze, a gun, and a stash of illegal drugs,send them into a major city alone, and TRUST them to be safe.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
December 16th, 2007, 05:48 AM
#11
Re: block another program from running?
 Originally Posted by TheCPUWizard
David, I REALLY have to disagree. Your sister has been LUCKY.
I know personally (not through hear-say, but direct pesonal knowledge of the people) of children who have been CONVICTED of ADULT crimes for posts on MySpace. (ala "I wish ....was dead, I hate him/her).
I am a strong advocate that NO CHILD under the age of 18 should be trusted to the point of stupidity. I know of no responsible parents who would hand their child a bottle of booze, a gun, and a stash of illegal drugs,send them into a major city alone, and TRUST them to be safe.
Hmmm... Basicallly we ae a bit of topic, but this can be seen different. My son is 25 and has become a very nice, and ethical man and my way also was to talk a lot about any kind of problems which can came up with the internet but I also trusted him and didn't restrict his personal responsibility. But that has to do with how education starts from the very early beginning. But it was in the beginning of the internet ( as he's 25 now ). And trusting a child doesn't need to shut the own eyes about how he/she is doing all the day. It needs much more time for chilren then to restrict their possibilities. Things which arn't as they should be needs to be corrected early and the child needs enough informmation to know why he should do / should not do something until a point of real understanding.
Restricting may help, bu then they grow up to 18 and maybe havn't learned to be responsible for their decisions. And what folows then ?
So lets say each coin has two sides. We are responsible for our childs and needs to decide in the different situations of life, where we can trust or youngsters and in which case we need to do restrictions. Different childs may need different hadlings too. Restrict ( Forbid) everything per sure is exactly the same bad way as allow everything, as allow everythng to everybody could get a problem and forbid everything creates a situation where the person feels strong whishes to do all that forbidden things and at least then when he's 18 and suddenly al the restrictions fall you will have great disaster. The golden way in the middle of the raod is the right one. Thats my opinion, But its of topic so this is more for chit chat forum.
 Jonny Poet
To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
If anyone felt he has got help, show it in rating the post.
Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
My latest articles :
Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7
-
December 16th, 2007, 06:06 AM
#12
Re: block another program from running?
 Originally Posted by TheCPUWizard
I am a strong advocate that NO CHILD under the age of 18 should be trusted to the point of stupidity. I know of no responsible parents who would hand their child a bottle of booze, a gun, and a stash of illegal drugs,send them into a major city alone, and TRUST them to be safe.
Ehh, I'd like to disagree with this (not the gun part, obviously), but it really depends on where you live. The culture in Denmark is vastly different from that of NY, and allowing children under the age of 18 to not run certain program or using myspace seems (to me, from Denmark) really silly. I can understand if we're talking about children of the age of 12 or younger, who I believe don't have a stable enough moral ground to be left alone with everything (though I'd still like to think they should definately have their privacy).
But then again, our legal age for both drinking and having sex is 16. If you don't do it, you won't learn it, pretty much.
This, of course, is how I feel parents should act (at least in Denmark), if we're talking about a school restricting the pupil's access to websites, program, etc. then that's entirely different and the school is in their full right to restrict them however they wish.
Sincerely,
Martin Svendsen
-
December 19th, 2007, 09:43 AM
#13
Re: block another program from running?
hahaha.. i thought the long scroll bar means I have many people answering my question, but then..
oh, well..
ok..back to the topic... i found this program called IM Lock (www.comvigo.com). it can block/automatically shut down instant messaging, internet browser, games and any other programs.. how did they do this?
let's skip all those reasons why i shouldn't do this.. because on the second thought, as most of u suggested here, it's better for me to just use the windows security function... but just for learning purposes.. and i'm technically curious on how this thing could be done... anyone here knows how to do this?
thanks a lot
-
December 19th, 2007, 01:04 PM
#14
Re: block another program from running?
 Originally Posted by imin
ok..back to the topic... i found this program called IM Lock ( www.comvigo.com). it can block/automatically shut down instant messaging, internet browser, games and any other programs.. how did they do this?
Sounds like a regular firewall to me. It blocks IMs and lets you control your internet.
Allowing shutdown of a game or any other program is also simple. You transverse what's currently open and end it.
 Originally Posted by imin
let's skip all those reasons why i shouldn't do this.. because on the second thought, as most of u suggested here, it's better for me to just use the windows security function... but just for learning purposes.. and i'm technically curious on how this thing could be done... anyone here knows how to do this?
Other than using Windows security (like you've already been told), there is no other way to do it and it's not a good idea. The only thing this can be used for is bad things. If this is for a real, good reason then you already have the access you need to setup group policies.
-
December 20th, 2007, 08:13 AM
#15
Re: block another program from running?
 Originally Posted by kasracer
Sounds like a regular firewall to me. It blocks IMs and lets you control your internet.
Allowing shutdown of a game or any other program is also simple. You transverse what's currently open and end it.
thanks for the information.. but how do we do this in C#? is it simply by searching the .exe filename in the Process and kill the program? If so, this comvigo program can even close Yahoo Messenger even though i change the file name of YM.
here's a sample code i found on the internet on closing program by searching its exe name in the Process...
Code:
Originally posted by pareshgh
Process []pArry = Process.GetProcesses();
foreach(Process p in pArry)
{
string s = p.ProcessName;
s = s.ToLower();
if (s.CompareTo("winword") ==0)
{
p.Kill();
}
}
but i believe this method won't work if we don't know the file name of the program (or if the user changes the .exe name)
thanks a lot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|