java - What's the vbs code to schedule a task every time Windows starts up? -


write

I know that a .exe program vbs code to schedule a Windows Work to start every time How to want windows starts

I found the following code line:

  strComputer = "." Set objWMIService = GetObject ( "winmgmts:" _ & amp; "{impersonationLevel = impersonate} \\!" & Amp; strComputer & amp; "\ root \ cimv2") set objNewJob = objWMIService.Get ( "Win32_ScheduledJob") errJobCreated = ObjNewJob.Create _ ("Notepad.exe", "******* 123000.000000-420", _ True, 1 or 4 or 16 ,, JobID) Wscript.Echo errJobCreated  

But it only tells me how to schedule work in a particular day and hours.

I thought about making a window service. Although the following story is the reason that I should pay attention to this one option.

I created a windows service with my java program wrapped up. When I first installed it and started it, the service worked fine, the service worked fine. However, after restarting my Windows XP, saying out of a dialog window that my Janel has generated exe file, crashed poped kept on going with my RunAsService service. When I put an end to the service and it was again manually restart the service to work properly, however, the same accident occurs again and again every time I restart Windows.

to make it will not be easy shortcut to your application in the Startup folder ???


Comments