So I just put it on the Task Scheduler to open this .txt every hour but it always ends up opening up the "Open with" menu and giving me "Acess denied" when I choose the program. Does anybody know of a better way of doing this? I'm on Windows 8.
2 Answers
You could try specifying the full command you are trying to run, e.g.:
"C:\Windows\notepad.exe"
with the full path to the file you want to open as the arguments.
- 1,689
-
The reservation that I have with this method is that the user must keep closing the file that's opened. – Debra Oct 14 '13 at 01:52
-
1I would imagine that's useful so you are sure it has been seen. Depends on the requirements! – sahmeepee Oct 14 '13 at 20:34
Download "messagebox" or a similar program, designed to put messages on the screen, rather than trying to display a textfile. I use the program from http://www.optimumx.com/downloads.html -- I'm including the page link on the latter as it has several other useful utilities. This creates a windows-style message box, with lots of options -- i.e. you could set it to display a box with no controls (buttons) that will go away after x number of seconds.
The command is very simple, just put in the "action" section of your Windows Task Scheduler something like:
c:\<full path to MessageBox>\MessageBox.exe
and on the parameters field, you should put:
/C:Whatever caption (title) /M:this is the content /W:display for x seconds
If you use
messagebox /T:? it will show the different button options for /T: (OK, Cancel, no buttons, etc.)
- /C: specifies the caption to display in the title bar.
- /M: specifies the message to display to the user.
- /W: number of seconds to wait before timing out (optional).
- /T: specifies the type of icon and buttons (optional).
- /T:? Displays extended help for /T: options and return codes.
To display multiple lines, separate them with \n; to tab, use \t.
One warning, it doesn't work if the total command is more than 256 chars, but that usually will get you 4-5 lines of text displayed.
Here's an example with the results (which will stay on screen for 10 seconds):
E:\sources\MessageBox\MessageBox.exe /C:sample caption
/M:this would be the \t\nmulti-line message\t /W:10 /T:35

-
The readme file doesn't help a lot. How do you use this program? It seems promising – Thiago Oct 20 '13 at 21:46
-
-
It's very simple -- like this, for example: "messagebox.exe /C:Whatever caption (title) /M:this is the content /W:display for so many seconds". If you use "messagebox /T:?" it will show the different button options for /T: (OK, Cancel, no buttons, etc.) /C: specifies the caption to display in the title bar. /M: specifies the message to display to the user. /W: number of seconds to wait before timing out (optional). /T: specifies the type of icon and buttons (optional). /T:? Displays extended help for /T: options and return codes. \n in a string inserts a new line; \t inserts a tab. – Debra Oct 21 '13 at 02:18
-
-
1
-
There are features in messagebox that I particularly like, including being able to specify the buttons & how long it stays on the screen. But it all depends on the actual requirements, as sahmeepee notes. – Debra Oct 21 '13 at 02:39
-
That would actually be more according to the behavior that I actually want although I'm using sahmeepee's solution right now. Where do these commands you talk about go? The customization options seem really great – Thiago Oct 21 '13 at 19:59
-
You can run the command directly as a scheduled task, or put it in a batch file (esp. if you want additional actions) or even set a batch file that runs in the background & just waits for each period of time, then re-runs the command. Just be sure to use the full path for the "messagebox.exe" program. For example, you could have a batch file that tests for a running program, and only displays the message if the program is open. The "timeout" command is useful for looping in a batch file & then waiting before reiterating. – Debra Oct 21 '13 at 22:24