Quantcast

Maximum PC

It is currently Tue Sep 30, 2014 8:29 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Mon Nov 23, 2009 12:07 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
No worries, I wanted an interesting / small problem to work on this week... I am going to forget everything I am doing at work anyway... and I can see this having some benefit for others too (gamers especially, add a list of processes to stop when your favorite game launches? shit yeah!)

Honestly it wasn't TOO hard. The biggest problem is I don't have anything to really test with. I suppose I could come up with a couple dumb test cases (using notepad and calc or something).

I really need to get it configurable via dat files or something and do some basic stats to find out how long it takes to run, because the interval can be tweaked as needed after that.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 7:02 am 
Malware specialist
Malware specialist
User avatar

Joined: Sun Apr 03, 2005 12:49 pm
Posts: 11696
Location: Kansas City, KS
The download for VS kept freezing last night, not sure why.

Trying again today and will see if it works.

Sorry for the delay.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 7:03 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
No worries. If I get some time I will try it with a couple processes (notepad and calc probably).


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 7:11 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
On the plus side, the install / uninstall process works :)


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 7:23 am 
Malware specialist
Malware specialist
User avatar

Joined: Sun Apr 03, 2005 12:49 pm
Posts: 11696
Location: Kansas City, KS
All right, Visual C# Express 2008 does not work (says it's not compatible with the project).

Going to try Visual Studio 2008 Professional (larger download).


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 7:42 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Weird....

Actually, that might make sense. I don't know for a fact but something tells me express can't handle service projects.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 7:47 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
So I verified that it works... sort of.

What I need to know is what account do these process run under. Do they run under the user account? Right now the way I have it written (and your copy of the code may need changed) is it will start the process under the account the service is running....

So the service starts calc.exe, but I as the user can't see it because I have it running under a system account. Make sense?

I assume that they run at the user level?


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 7:59 am 
Malware specialist
Malware specialist
User avatar

Joined: Sun Apr 03, 2005 12:49 pm
Posts: 11696
Location: Kansas City, KS
Yeah, it runs at the user level.

But my user account is always hackman2007. I'll give it a try after I get VS 2008 Professional installed (3.3GB so may be a little bit).


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 8:09 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Username shouldn't matter. If this service gets installed for all users it should work as long as those processes are both running under the same account.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 2:10 pm 
Malware specialist
Malware specialist
User avatar

Joined: Sun Apr 03, 2005 12:49 pm
Posts: 11696
Location: Kansas City, KS
I finally got Visual Studio 2008 Professional loaded on my machine.

I can't figure out how to run this though. I was successfully able to build the project, but can't figure out how to get it to run.

All I can say is, wow VS is complex.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 2:59 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Okay, so there are two projects in there. The Windows Service and the installer. You can right click on the installer and click install and it will run. The only problem is the service is going to run under the wrong account.

So it should work for those processes but I need to tweak it a little bit. Feel free to play with it to see what I did, but understand it was kinda threw together.

Once I get it tweaked and updated to support some config files it should be good to go and I could just give you an installer to run and your service will be running and good to go.

Let me know if you have any questions about the project or code.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 3:16 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
hackman2007 wrote:
All I can say is, wow VS is complex.
Once you get at home with it, it is REALLY powerful.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 4:08 pm 
Malware specialist
Malware specialist
User avatar

Joined: Sun Apr 03, 2005 12:49 pm
Posts: 11696
Location: Kansas City, KS
I don't get any options to install when I right click on the installer.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 5:28 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
hackman2007 wrote:
I don't get any options to install when I right click on the installer.
In VS right click on the installer project?

You should get an install and uninstall option in the menu.

http://2.bp.blogspot.com/_9JzvvMU7X2E/S ... Setup1.jpg


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 6:13 pm 
Malware specialist
Malware specialist
User avatar

Joined: Sun Apr 03, 2005 12:49 pm
Posts: 11696
Location: Kansas City, KS
Tried that, no dice.

There is no install or uninstall option when I right click it.

Edit: When I right click on WatcherSetup I do get an Install/Uninstall option.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 8:27 pm 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Werd, that is what you want. It will install it as a service.


Top
  Profile  
 
 Post subject:
PostPosted: Tue Nov 24, 2009 9:04 pm 
Malware specialist
Malware specialist
User avatar

Joined: Sun Apr 03, 2005 12:49 pm
Posts: 11696
Location: Kansas City, KS
CrashTECH wrote:
Werd, that is what you want. It will install it as a service.


Service started successfully.

Will play around with it some tomorrow.


Top
  Profile  
 
 Post subject:
PostPosted: Wed Nov 25, 2009 4:51 am 
SON OF A GUN
SON OF A GUN
User avatar

Joined: Mon Nov 01, 2004 5:41 am
Posts: 11605
Only trouble is, being that I have never worked with developing windows services before, the only way I know is to uninstall it and make your changes, then reinstall.


Top
  Profile  
 
 Post subject:
PostPosted: Wed Nov 25, 2009 11:57 am 
Million Club - 5 Plus*
Million Club - 5 Plus*
User avatar

Joined: Sun Sep 12, 2004 6:37 pm
Posts: 4745
Location: In the monkey's litterbox
There is another way to install it that doesn't require continuously reinstalling it.

1. Open a VS command prompt to the bin/Debug directory of the service
2. installutil <ServiceName>

To uninstall, just use installutil /u <ServiceName>

Rebuilding the solution in VS does require that the service is stopped, but then you don't have to reinstall the service every time.


Top
  Profile  
 
 Post subject:
PostPosted: Thu Nov 26, 2009 9:06 am 
Malware specialist
Malware specialist
User avatar

Joined: Sun Apr 03, 2005 12:49 pm
Posts: 11696
Location: Kansas City, KS
Okay, played around with it a bit.

Seems to work great.

Thanks again.


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.