Help with using Task Scheduler to open a program/file
Tags:
-
Windows 8
- Task Scheduler
- Command Prompt
- Task Manager
Last response: in Windows 8
Luke Boobyer
October 15, 2014 1:32:26 PM
Hi I have been trying to use Task Scheduler to open a program or a file but I can't quite get it to work, and I am now going around in circles after having worked on this problem all day.
The issue is that Task Scheduler manages to run the program but not fully. I can see that the program is running in task manager but not in my window. I have tried opening various programs and they all run, but I can only see it running in the task manager. I need it to open fully so I can actually use it.
Currently all I am trying to do is open Command Prompt.
Within my Task Scheduler task I am using the following settings (I have only included the ones I thought might be relevant to this issue)
General tab:
Run whether user is logged on or not
Run with highest privileges
Configure for Windows 8.1
Action tab:
Action: Start a program
Program/script: cmd
Settings
Allow task to be run on demand
I'm really at a loss now as to how I can get this to work correctly. Any assistance would be greatly appreciated.
The issue is that Task Scheduler manages to run the program but not fully. I can see that the program is running in task manager but not in my window. I have tried opening various programs and they all run, but I can only see it running in the task manager. I need it to open fully so I can actually use it.
Currently all I am trying to do is open Command Prompt.
Within my Task Scheduler task I am using the following settings (I have only included the ones I thought might be relevant to this issue)
General tab:
Run whether user is logged on or not
Run with highest privileges
Configure for Windows 8.1
Action tab:
Action: Start a program
Program/script: cmd
Settings
Allow task to be run on demand
I'm really at a loss now as to how I can get this to work correctly. Any assistance would be greatly appreciated.
More about : task scheduler open program file
-
Reply to Luke Boobyer
Luke Boobyer
October 15, 2014 1:41:36 PM
getochkn said:
What at you trying to do exactly. Want a command prompt open then open oneI am trying to use Task Scheduler to simply open Command Prompt. In the end I actually want to use Task Scheduler to open an excel file on a schedule so it opens at the same time each day, but no matter what I do I always run in to this issue. So for troubleshooting reasons all I am trying to do right now is open Command Prompt by manually running a task in Task Scheduler.
-
Reply to Luke Boobyer
m
0
l
Related resources
- scheduling vbscript using the task scheduler - Forum
- Help with Task Scheduler utility - Forum
- Problem executing Help from the Task Scheduler - Forum
- Task scheduler - Help - Forum
- Task Scheduler Please Help!!! - Forum
cirdecus
October 15, 2014 1:41:59 PM
Luke Boobyer
October 15, 2014 1:45:21 PM
you might try the command
"start cmd.exe"
otherwise I think the cmd.exe will run start the script you wanted (none listed) then automatically exit.
or maybe make a batch file like
dog.bat with the command inside.
start cmd.exe
and schedule dog.bat to run.
it is hard to say what will be run if you leave out the file extention. There is a order that windows will check first
.exe, .cmd and .BAT
and reserved names are bad name to use for a command file name. hard to confuse dog.bat as a name
cmd can have many meanings, cmd.exe the shell, cmd.bat, cmd.cmd the one that gets run will depend on your search path and your environment variables.
"start cmd.exe"
otherwise I think the cmd.exe will run start the script you wanted (none listed) then automatically exit.
or maybe make a batch file like
dog.bat with the command inside.
start cmd.exe
and schedule dog.bat to run.
it is hard to say what will be run if you leave out the file extention. There is a order that windows will check first
.exe, .cmd and .BAT
and reserved names are bad name to use for a command file name. hard to confuse dog.bat as a name
cmd can have many meanings, cmd.exe the shell, cmd.bat, cmd.cmd the one that gets run will depend on your search path and your environment variables.
-
Reply to johnbl
m
0
l
Luke Boobyer
October 15, 2014 1:55:43 PM
-
Reply to Luke Boobyer
m
0
l
Luke Boobyer
October 15, 2014 2:02:01 PM
put your commands in a batch file, then when you try to run the script put the full path to the batch file
"c:\user\myname\mybatchfile.cmd"
otherwise you might have to tell the task scheduler where you base directory is located. IE where to start in to look for the batch or cmd file
"start cmd.exe"
otherwise I think the cmd.exe will run start the script you wanted (none listed) then automatically exit.
Ok in Program/script: I have cmd.exe
and then in Add arguments (optional) I added "start cmd.exe"
However the issue persists.
"c:\user\myname\mybatchfile.cmd"
otherwise you might have to tell the task scheduler where you base directory is located. IE where to start in to look for the batch or cmd file
Luke Boobyer said:
johnbl said:
you might try the command "start cmd.exe"
otherwise I think the cmd.exe will run start the script you wanted (none listed) then automatically exit.
Ok in Program/script: I have cmd.exe
and then in Add arguments (optional) I added "start cmd.exe"
However the issue persists.
-
Reply to johnbl
m
0
l
chugot9218
October 15, 2014 2:08:33 PM
Luke Boobyer
October 15, 2014 2:10:55 PM
johnbl said:
put your commands in a batch file, then when you try to run the script put the full path to the batch file"c:\user\myname\mybatchfile.cmd"
otherwise you might have to tell the task scheduler where you base directory is located. IE where to start in to look for the batch or cmd file
Luke Boobyer said:
johnbl said:
you might try the command "start cmd.exe"
otherwise I think the cmd.exe will run start the script you wanted (none listed) then automatically exit.
Ok in Program/script: I have cmd.exe
and then in Add arguments (optional) I added "start cmd.exe"
However the issue persists.
Thanks I just tried that but I get the same results. It is still only visible in the task manager.
-
Reply to Luke Boobyer
m
0
l
Luke Boobyer
October 15, 2014 2:13:19 PM
chugot9218 said:
On Windows 7 I was able to accomplish this with Excel without issue, are you sure you are pointing to the right path/executable?I'm pretty sure I am. The excel file is located at ‪C:\Users\Luke\Desktop\MainLinks.xlsm
That's what I was putting in the Program/script area.
I can only see it open in the task manager.
-
Reply to Luke Boobyer
m
0
l
Luke Boobyer
October 15, 2014 2:23:53 PM
chugot9218
October 15, 2014 2:26:06 PM
-
Reply to chugot9218
m
1
l
Luke Boobyer
October 15, 2014 2:38:36 PM
chugot9218 said:
Make your target "C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE" And your argument should be C:\Users\Luke\Desktop\MainLinks.xlsmYou will need to point it to the proper location of your EXCEL.EXE if it's not at that location, it will depend on your version of Office.
That does appear to be where my excel is located however when I entered those values into Task Scheduler it didn't actually open Excel. There was no task in task manager.
-
Reply to Luke Boobyer
m
0
l
chugot9218
October 15, 2014 3:05:27 PM
Luke Boobyer
October 15, 2014 3:19:23 PM
chugot9218 said:
How about if you clear your argument and just try Excel.exe, does it open an instance of Excel?I just restarted my laptop and tried your previous advice again:
target "C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE" And your argument should be C:\Users\Luke\Desktop\MainLinks.xlsm
This time it opened excel but I could only see it in task manager.
Additionally I tried your advice quoted in this message and it opened excel but again I could only find it in task manager
-
Reply to Luke Boobyer
m
0
l
Best solution
What OS?
I am on Win 8 and just started task scheduler, used the wizzard, and excel just popped open at 6:17. i then added the file name with extension to the arguement field, changed "start in" to h"\users\documents" where my docuements are and excel just opened the file at 6:21 as scheduled.
What OS are you doing, I just tried and it worked fine for me.
I am on Win 8 and just started task scheduler, used the wizzard, and excel just popped open at 6:17. i then added the file name with extension to the arguement field, changed "start in" to h"\users\documents" where my docuements are and excel just opened the file at 6:21 as scheduled.
What OS are you doing, I just tried and it worked fine for me.
-
Reply to getochkn
Share
Luke Boobyer
October 15, 2014 3:37:55 PM
getochkn said:
What OS?I am on Win 8 and just started task scheduler, used the wizzard, and excel just popped open at 6:17. i then added the file name with extension to the arguement field, changed "start in" to h"\users\documents" where my docuements are and excel just opened the file at 6:21 as scheduled.
What OS are you doing, I just tried and it worked fine for me.
I'm using Win 8.1.
Ok I just tried setting up a new task using the basic task wizard and I was able to get it to work, Thank you for the suggestion.
Program/script: "C:\Program Files (x86)\Microsoft Office\Office14\EXCEL.EXE"
Add arguments (optional): C:\Users\Luke\Desktop\MainLinks.xlsm
Start in (optional): C:\Users\Luke\Desktop
However what I have narrowed it down to is the Run whether user is logged on or not option under the general tab.
With Run only when user is logged on selected it opens fine.
However if Run whether user is logged on or not is selected then I run into the problem where it opens but I can only see it in the task manager.
This is progress but the whole point of me setting this up originally was to run it when the laptop is opened from sleep automatically and without me having to log in.
-
Reply to Luke Boobyer
m
0
l
chugot9218
October 15, 2014 4:03:53 PM
Luke Boobyer
October 16, 2014 3:55:03 AM
I now have it set on a schedule to wake computer up from sleep at a certain time and execute the task of opening the excel workbook.
It wakes up from sleep fine but it wont open excel unless I am logged in. The run whether logged on or not option still only runs it as a service like you said.
I don't want to have to remove my password login option for my laptop so this isn't ideal, but at least the original problem of this thread has been solved. I think I'll do some searching and see if I can find a solution to this new problem. If I can't find anything I'll post another forum thread to see if anyone might have an idea about it.
Thank you to everyone who helped me investigate this issue.
It wakes up from sleep fine but it wont open excel unless I am logged in. The run whether logged on or not option still only runs it as a service like you said.
I don't want to have to remove my password login option for my laptop so this isn't ideal, but at least the original problem of this thread has been solved. I think I'll do some searching and see if I can find a solution to this new problem. If I can't find anything I'll post another forum thread to see if anyone might have an idea about it.
Thank you to everyone who helped me investigate this issue.
-
Reply to Luke Boobyer
m
0
l
Related resources
- My task manager has 93 processes running am using email & 2 open windows in Forum
- DOS window and Task Manager fail to stay open for use Forum
- how to use the task scheduller? Forum
- Scheduled Tasks Will Not Open Forum
- SolvedMemory use is at 89% when nothing is open! Please help Forum
- Using Scheduled Tasks, how to connect automatically to the.. Forum
- Using Scheduled Tasks Forum
- Help please with Scheduled Tasks Forum
- Scheduled Tasks - HELP Forum
- Choosing a CPU for multi-tasking and general use -Help please Forum
- More resources
Read discussions in other Windows 8 categories
!