2

I have a .bat file I want to start every time windows loads. Is there a cheap way of having a service (or something else, I don't care what) launch this .bat file? Preferably I do not want the user to see any of this happening.

Thanks.

1
  • I second @avanek's recommendation for using the Task Scheduler, but if you really want to write a Windows service to do this you could use the Process class to launch your .bat with proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;. Commented Aug 29, 2011 at 20:19

2 Answers 2

3

I'd use the Windows Task Scheduler personally.

Edit:

The above link is primarily for the API. Here's a link for using the Task Scheduler 2.0 GUI.

2

You don't need a service... Just place it in the users Startup folder or use the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run entry in the registry.

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