3

I added a batch file to the Windows 7 scheduler and it works fine. The problem is it always displays a command prompt window when it is run. I created a shortcut for the batch file and set it to run minimized in properties.

Then I went to the scheduled task and tried to change the action to run the shortcut instead of the original batch file. The problem is the scheduler resolves the shortcut immediately and puts the original batch file path to the action field. What should I do?

5

You need to tell the batch file to run without a console.

This page has some instructions for writing a Windows Script:

Set Shell = CreateObject("WScript.Shell")
Shell.Run <Path to command or batch file>, 0, False

It also mentions a tool called hstart - which I haven't seen before, so you'd need to check it out.

This question on Stack Overflow has some other suggestions as well as full instructions for writing a vb script to wrap the code I posted above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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