Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an .net application which I would like to start automaticallly when a user log into a computer. Now this application needs to be started when the user log on. I know I can put this into the startup folder, but this is not an option as the user will be able to 'easily' prevent that by removing the application.

Is there any way to start an application when user log on that is 'hard enough' for a 'normal user' to prevent. I get the point where a power user might be able to edit the registry for example, but I want to prevent most people from doing it.

I see applications like Steam who start at logon and that are not in the startup forlder, so I guess it's not too hard to do when you know how to. I guess it's al part of the install kit I will make somehow.

Edit : Let me clear something up. The thing with this application is that some institution are by-law required to provided some information some user actions so this application will log those actions. They must also provide best-effort to prevent user from bypasing the data from being logged. By best-effort, it means that it must prevent users with little knowledge of computer. I can't really go into the specifics as it is highly confidential, but the application that will be started will not be visible to the user, yet it cannot be a service because of some of the service's limitations. All of those issues have already been taken care of as of now.

The only thing that we need to adress is the fact that this application may have to be installed on business server, which really isn't that much of a problem since we have control over those servers, but also home computers, for users that will request the access to certain ressource outside their workplace. They will have to install some kits in order to access the said ressource, and one of those kits will be the application that logs.

I am fully aware that a power user will be able to bypass it and that some people will go into the task manager to stop the process, but we are providing best-effort and they will be the one with problems if this is noticed.

Thanks,

share|improve this question

migrated from stackoverflow.com Nov 7 '12 at 12:45

This question came from our site for professional and enthusiast programmers.

1  
This sounds like a terrible idea and I would never install your application because of this. Consider that. –  Jordan Kaye Nov 6 '12 at 16:20
    
Is this a business application? You could create a service that launches the application –  msmucker0527 Nov 6 '12 at 16:21
    
GroupPolicy support.microsoft.com/kb/314488 –  Blam Nov 6 '12 at 16:22
    
Jordan : This application is not intended to be installed on any machine. It's a product that will be required by law for a specific business, so they won't have the choice to install it. The law requires that we do 'best effort' to prevent people from removing it, meaning is some power user finds the way, they will have problem, not us. –  David Brunelle Nov 6 '12 at 16:28
    
Can we change group policies on installation ? –  David Brunelle Nov 6 '12 at 16:29
show 1 more comment

4 Answers

You can put it in StartUp folder of AllUsers which cannot be modified by a normal user.

Also you can use HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run registry key.

share|improve this answer
    
Using the registry sounds like something that I would go for I think as it does satisfy the 'hard enough' part I guess. –  David Brunelle Nov 6 '12 at 16:33
    
There are other methods used by malwares I excluded here i.e using RunOnce ... This method is the standard way for doing what you want. Still an administrator can remove it from Run command, msconfig (StartUp tab). Since your question is about a limited user, not an administrator, it could be considered as a legitimate request. –  Xaqron Nov 6 '12 at 21:13
add comment

There's a simple way, which is unknown even for many 'advanced users'.
All other ways can require different user privileges, except this one!

Simply put a shortcut of your program to user's StartUp folder and HIDE IT.
It will NOT be listed in MSConfig. If you want it to be 'hard enough' for a 'normal user', change shortcut's attributes to SYSTEM and HIDDEN.

And if you want to make it "invisible" for Task Manager, rename your file to svchost.exe or smtg like that.

All this will prevent 'normal users' from seeing and ending your app.
If you want to hide it for 'advanced users', there's a way for deleting ListBox/ListView's item from another window (including TaskMgr, ProcMon, etc) using .NET ... I think you understand what I want to say, but it's another theme ;)

Good luck!

share|improve this answer
    
+1 Yes, it'll be hard to find it after it:) –  SEARAS Mar 24 '13 at 21:08
add comment

If it is for 'security by obscurity' how about scheduling a task to be run on logon?

In your setupkit you run:

schtasks /create /tn AccProv /tr c:\yourpath\yourlogger.exe /sc onlogon /ru System
share|improve this answer
add comment

Group policy

Group Policy

If you are in a domain via Active Directory can enforce.

Home supports Group Policy but not the domain (Active Directory) side of group policy.

Or can use local Group Policy.

The tool to edit is gpedit.msc

Set program to run at startup

How to modify the Group Policy for programs that run at user logon

share|improve this answer
    
Can we change those policy using a setup kit. I know we can do some custom actions during installation, but is this support ? Plus is this available on all Windows (XP and more recent?) , including the home version ? –  David Brunelle Nov 6 '12 at 16:32
    
Now that is the difference. Home does NOT support domina side of Group Policy. XP is supported. –  Blam Nov 6 '12 at 16:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.