INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Run MC from Task Scheduler Minimized  (Read 13446 times)

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Run MC from Task Scheduler Minimized
« on: February 20, 2015, 01:47:50 pm »

I am running MC 20 directly from the Windows 8.1 Task Scheduler (to make MC 20 load much sooner at Windows boot).

The only problem I have encountered (so far) is I can't seem to make MC load Minimized' it always wants to load maximized. I have tried the following switches...
/minimise
/minimize
/t
/MIN
None work in the Task Scheduler.

Any ideas?
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

Micromecca

  • Galactic Citizen
  • ****
  • Posts: 283
Re: Run MC from Task Scheduler Minimized
« Reply #1 on: February 20, 2015, 03:46:46 pm »

Why not just start the server, it will run in the system tray

Code: [Select]
MC20.exe /MediaServer
Logged

kstuart

  • Citizen of the Universe
  • *****
  • Posts: 1955
  • Upgraded to MC22 Master using preorder discount
Re: Run MC from Task Scheduler Minimized
« Reply #2 on: February 20, 2015, 03:54:46 pm »

Alternately do a Google Search:

" Scheduled Task Minimized Windows ___ " (where ____ is your version of Windows)

I did that Google Search in the past for a different Scheduled Task (and sorry I promptly forgot the answers and they might not apply to your Windows version anyway).

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #3 on: February 20, 2015, 06:12:33 pm »

Quote
Why not just start the server, it will run in the system tray

Code:
MC20.exe /MediaServer

Thanks for the input. I tried your suggestion by running MC20.exe /MediaServer from the Task Scheduler; MC did run minimized BUT...
1: Screens were totally scrambled.
2: Was missing all the menus & Visualizations & everything right of the tree.
3: Using MC20.exe /MinMax also caused several problems.
4: MC was nowhere to be found in the System Tray, on the Task Bar or anywhere else.
5: Although MC is running & playing music it does not show in the Windows Task Manager.

Soooo... on to the next suggestion.
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #4 on: February 20, 2015, 06:36:46 pm »

Quote
Alternately do a Google Search:

" Scheduled Task Minimized Windows ___ " (where ____ is your version of Windows)

Tried that; they all either refer to linking to a shortcut on the Desktop (with the Shortcut having Minimize checked) or linking to a batch file. The Desktop Shortcut method does not work in Win 8.1 as the Shortcut has exactly the same file location pointers as a normal Shortcut that runs MC so it has the same problems. The batch file method might work with a lot of messing around but there has to be a more simpler & direct way such as a switch.  
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Run MC from Task Scheduler Minimized
« Reply #5 on: February 20, 2015, 07:44:10 pm »

Thanks for the input. I tried your suggestion by running MC20.exe /MediaServer from the Task Scheduler; MC did run minimized BUT...

That's not the way to do it.  MC has this function built in... Tools > Options > Startup > Windows Startup

Can you explain why you want MC to launch minimized?  And where exactly are you trying to start it?  That might help to provide a solution.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #6 on: February 20, 2015, 08:24:56 pm »

Quote
MC has this function built in... Tools > Options > Startup > Windows Startup
I know, have used it many times but it loads too late for my needs.

I am running MC 20 directly from the Windows 8.1 Task Scheduler (to make MC 20 load much sooner at Windows boot). Doing it this way loads MC MUCH sooner with music playing (often BEFORE the Desktop shows up... at the user log in screen.)

I created a Basic Task naming it JRiver MC & fill in all the various task screens with the Action window pointing to "C:\Program Files (x86)\J River\Media Center 20\Media Center 20.exe".

The Task Scheduler runs MUCH earlier before Windows desktop comes up so any item running from the Task Scheduler loads really early on.

One big problem with doing it this way has always been that many programs including MC always loads maximized no matter what. The internet is full of users trying to resolve this issue with Task Scheduler (to get programs to load minimized rather than maximized.

The reason I want MC to load minimized (OR to the Task Tray) is simply I just want music to start playing in the background without MC popping up hogging my whole screen maximized. Loading MC normally does this but it loads to late in the boot process in Win 8.1 for my liking so I have been looking for other ways to load MC earlier on. Loading MC from the Task Scheduler is the fastest method available in Windows so if I can resolve the Maximize problem I would be one happy camper indeed.

Maybe MC itself needs an option to load Min Max or Normal so MC can be loaded without the use of a Shortcut?
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

Micromecca

  • Galactic Citizen
  • ****
  • Posts: 283
Re: Run MC from Task Scheduler Minimized
« Reply #7 on: February 21, 2015, 02:32:22 am »

That's not the way to do it. 

Glynor, what is the issue with running it this way?
I have ran it this way myself before with no issue other than MC wouldn't import new media until the main interface was opened.

cheers
Martin
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Run MC from Task Scheduler Minimized
« Reply #8 on: February 21, 2015, 08:56:34 am »

You can certainly launch it that way, but that is probably more trouble than it is worth in most instances.

I think some of the problems here are that he's trying to launch MC before the shell has loaded, which causes:

1: Screens were totally scrambled.
2: Was missing all the menus & Visualizations & everything right of the tree.

4: MC was nowhere to be found in the System Tray, on the Task Bar or anywhere else.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

kstuart

  • Citizen of the Universe
  • *****
  • Posts: 1955
  • Upgraded to MC22 Master using preorder discount
Re: Run MC from Task Scheduler Minimized
« Reply #9 on: February 21, 2015, 02:37:02 pm »

Every morning, my Task Scheduler runs a batch file which contains:

mc20.exe /play " [path and name of an audio file we like to hear first thing]"
mc20.exe /append TREEPATH="Playlists\Smartlists\Morning"

When I get up, I turn on the amplifier (which is off at night to save power ) and then the batch file runs.  (The smartlist randomly plays from any audio file in my Library that is marked with the "Morning" keyword, which thus excludes Metal and Schoenberg first thing in the morning. :) )

( This particular PC runs Windows 6, since the only applications it uses are MC20 and Firefox - it is our Home Theater PC for the 42" HDTV, and I've had no reason to update Windows just to run those two applications. )

I don't run that batch file minimized, but the suggestions in the Google search should work.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Run MC from Task Scheduler Minimized
« Reply #10 on: February 21, 2015, 04:13:00 pm »

Running BAT files minimized can sometimes be troublesome and besides, that still shows an item in the taskbar.  I prefer to do mine in VB script WSF files.  Here's one I use to launch MC to Theater View and make sure it is on top.

Code: [Select]
<package>
   <job id="vbs">
      <script language="VBScript">
         'Create our handy dandy Shell object
set WshShell = WScript.CreateObject("WScript.Shell")

'Launch MC in Theater View Mode
WshShell.Run "MCcl.exe /Mode Theater"

WScript.Sleep 500

'Make sure MC is on Top
WshShell.Run "MCcl.exe /Start"
      </script>
   </job>
</package>

WSF scripts only show UI when you want them to show UI.  And you get the benefit that you can do nice GUI message boxes and stuff if needed.

NOTE:  MCcl.exe is a trick I use to stand in for MC20.exe (etc) so that I don't have to update my scripts every time a new major version of MC comes out.  You can too if you want: http://blog.glynor.com/mcutilities/
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Run MC from Task Scheduler Minimized
« Reply #11 on: February 21, 2015, 04:32:34 pm »

It would be nice if, instead of discreet commands like the new /StartMax, they gave us an optional parameter to the regular /Start command that accepted Min, Max, and Restore (or something like that) to do this all in one step.  However, barring that, this works pretty well:

http://glynor.com/files/jriver/MC-Launch_Minimized.zip

Code: [Select]
<package>
   <job id="vbs">
      <script language="VBScript">
         'Create our handy dandy Shell object
set WshShell = WScript.CreateObject("WScript.Shell")

'Launch MC
WshShell.Run "MCcl.exe /Start"

'Sleep for a split second
WScript.Sleep 50

'Minimize MC
WshShell.Run "MCcl.exe /MCC 10014"
      </script>
   </job>
</package>

Note: This requires that you have the MCcl.exe executable I mentioned above installed and in your system path.  If you don't want to use that, just replace MCcl.exe in the above script with MC20.exe.

You might need to tweak the Sleep value to get it to work right.  50 ms as shown above worked reliably on my system and goes directly to the minimized MC UI (without showing it even for a split second), but if your machine is slower or something you might need to wait longer before you send the Minimize MCC command.

EDIT: Fixed a comment in the code.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #12 on: February 21, 2015, 07:02:57 pm »

<package>
   <job id="vbs">
      <script language="VBScript">
         'Create our handy dandy Shell object
      set WshShell = WScript.CreateObject("WScript.Shell")
      
      'Launch MC
      WshShell.Run "MC20.exe /Start"
      
      'Sleep for a split second
      WScript.Sleep 50
      
      'Minimize MC
      WshShell.Run "MC20.exe /MCC 10014"
      </script>
   </job>
</package>

It's been awhile since I played around with VB outside of Excel so I'm a little rusty.  I changed both MCc1.exe to MC20.exe but when I run it, it simply shows the code in a Notepad window. What did I forget?
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Run MC from Task Scheduler Minimized
« Reply #13 on: February 21, 2015, 07:23:26 pm »

The filename should be .wsf.

If it is .wsf and it is still opening in Notepad, then you've somehow messed up your file associations.  Restore the default by downloading and running the restorer for WSF files here:
http://www.sevenforums.com/tutorials/19449-default-file-type-associations-restore.html
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #14 on: February 21, 2015, 07:24:26 pm »

OK, I got it running after associating to MS Script Host. Problem is it still loads maximized. This is running the script directly form the file & not through Task Scheduler. I also tried it in a shortcut, same problem.

Does something need to be changed in the script?
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Run MC from Task Scheduler Minimized
« Reply #15 on: February 21, 2015, 07:32:01 pm »

Increase the sleep time until it works.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #16 on: February 21, 2015, 07:37:53 pm »

150 did not work, 175 works.

Does 175 sound like a reasonable number?
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #17 on: February 21, 2015, 07:47:17 pm »

Added the script to Task Scheduler, when I run it, a dialog pops up asking "How do you want to open this file?"  I select MC & it loads... MAXIMIZED!

Any ideas?
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Run MC from Task Scheduler Minimized
« Reply #18 on: February 21, 2015, 08:18:16 pm »

Added the script to Task Scheduler, when I run it, a dialog pops up asking "How do you want to open this file?"  I select MC & it loads... MAXIMIZED!

You should have picked "keep using Windows Script Host" at the prompt.  That just messed up your associations again.

MC loaded because you told it to open the script (which it can't), so it opened the way it was last used (like clicking on the regular icon) and then failed to play the script because it doesn't know how to play scripts.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Run MC from Task Scheduler Minimized
« Reply #19 on: February 21, 2015, 08:24:20 pm »

You may have to call wscript.exe (or cscript.exe, it doesn't matter for this script) in the Task Scheduler and provide the script as the argument, so that Windows doesn't ask you each time.

http://superuser.com/questions/556681/it-opens-open-with-prompt-whenever-scheduled-task-run
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #20 on: February 21, 2015, 09:08:55 pm »

Glynor... You are a genius!!

wscript.exe "D:\Temp\New Downloads\MCLaunchMinimized.wsf"

works MINIMIZED.

HAPPY DAYS ARE HERE AGAIN.

Thanks sooo much;
Doc
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #21 on: February 21, 2015, 09:32:06 pm »

WHOOPS... Spoke too soon.

New problems... It works correctly when I manually run MC from the Task Scheduler (it does load minimized); however...

1: When loading MC automatically from the Task Scheduler at Windows boot, MC still comes up MAXIMIZED (I have tried sleep timers all the way up to 500 with no effect)
2: When loading MC automatically from the Task Scheduler at Windows boot, MC actually loads much later than before any other method. Am thinking something is not available for the script to run this early in the boot process.
3: For some reason my Logitech LGS Gaming software is getting killed when the script runs. This does not happen every time but often enough that I know it is being caused as a side effect of the script.

Boy, this has turned into some project.

There has to be a better, simpler, cleaner, faster way to make a program minimize at Windows Task Scheduler boot up.

Any thoughts?
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Run MC from Task Scheduler Minimized
« Reply #22 on: February 21, 2015, 10:10:22 pm »

1: When loading MC automatically from the Task Scheduler at Windows boot,

You can't run MC at Windows Boot in the Task Scheduler.  That runs before any user logs in, which means it runs as the system user.  MC does not support being run as a system service, and you're likely to have all sorts of permissions problems.  Even if you force it to run as a specified user, it is a Very Bad Idea and nothing is guaranteed to work right.

You can run it at User Log on.  But, this is the same as loading it the way it has integrated in Tools > Options > Startup, which is why I said:

You can certainly launch it that way, but that is probably more trouble than it is worth in most instances.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

kstuart

  • Citizen of the Universe
  • *****
  • Posts: 1955
  • Upgraded to MC22 Master using preorder discount
Re: Run MC from Task Scheduler Minimized
« Reply #23 on: February 22, 2015, 11:44:09 am »

Okay, I had a little time so I looked up what works for a Batch File being called from Task Scheduler in Windows 6 ("Vista").  I ended up with this some months back, after trying several suggestions out of a Google Search.

It may or may not work for your needs, but these threads are sometimes read months later by someone else needing help.

The Task Action is:

%comspec% /c start "" /min "C:\mybatchfilename.bat"

This then runs a minimized windows on the Task Bar running the batch file.

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #24 on: February 22, 2015, 02:58:33 pm »

Quote
1: When loading MC automatically from the Task Scheduler at Windows boot,

You can't run MC at Windows Boot in the Task Scheduler.  That runs before any user logs in, which means it runs as the system user.  MC does not support being run as a system service, and you're likely to have all sorts of permissions problems.  Even if you force it to run as a specified user, it is a Very Bad Idea and nothing is guaranteed to work right.

Usually that is the case & was the case the last time I tried running MC17 from the Task Scheduler awhile back (under Windows 7). It would come up scrambled & had all kinds of problems.

BUT... that was MC17 & today we have MC20 so I thought it was time to try it again (under Windows 8.1 Pro); lo & behold it runs...
1: All screens are intact.
2: Audio runs perfectly.
3: Videos run perfectly.
4: Everything I normally use MC for was working correctly.

The only fly in the ointment was the maximize problem. I simply can't believe there is not an easy resolve to this.
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #25 on: February 22, 2015, 03:49:11 pm »

Quote
The Task Action is:

%comspec% /c start "" /min "C:\mybatchfilename.bat"

This then runs a minimized windows on the Task Bar running the batch file.

Thanks for the input.

I created a bat file to run MC20 & changed the Action window in Task Scheduler to...
%comspec% /c start "" /min "C:\MC20.bat"

The bat file itself ran minimized but MC still loaded maximized.

Do you know of any bat file command line switches that will load a program minimized?
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Run MC from Task Scheduler Minimized
« Reply #26 on: February 22, 2015, 03:52:51 pm »

I created a bat file to run MC20 & changed the Action window in Task Scheduler to...
%comspec% /c start "" /min "C:\MC20.bat"

That's functionally identical to the method I described and that you already tried.

There is not a load minimized command for MC itself, and it just won't work reliably to script it with the sleep timeout if you're loading it before the shell.  You could try increasing the timeout in mine even further (5-10 seconds), but I suspect it will be very difficult to get it to work reliably.

If you were really dedicated, you could try doing a loop-and-check-if-MC's-process-has-loaded type of operation in a VB script, but I'm not going to go through the effort to do that for you.  You might need to check for the shell first, and then loop and wait for MC, before running the MCC minimize command.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

DocLotus

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 2243
  • Retired and; Loving It!!!
Re: Run MC from Task Scheduler Minimized
« Reply #27 on: February 22, 2015, 04:10:04 pm »

Quote
That's functionally identical to the method I described and that you already tried.

I suspected that may have been the case.

I will try increasing the timeout further.

Oh, a BIG thanks for you help on this; although no real resolve has come up it still has been interesting.

It is interesting that MC20 will now load in the Windows 8.1 Task Scheduler with no apparent ill effects (other than the maximize problem).

Maybe MC needs a Minimize at Start up option?

Judging by the number of views on this topic I suspect there are many others that would benefit from such an option.

Once again... thanks;
Doc
Logged
MC... Latest version, 1 Mini PC, w/ Server.
TV... USA, ZIP 77036, Std view, Full screen, Not detached, Silicon Dust Guide, OTA, ATSC 1.
MC Audio... Realtek HD 7.1, MP3 Ext, Basic playback.
MC Control... Key, Mouse w/ G HUB.
Windows... 10 Pro, 64 bit, All MS updates.
Hardware... Beelink AMD GR5 Pro Mini PC, 16GB memory, 3 internal HDD's w/ 4.5 TB storage, 8 TB external storage.
1 SiliconDust HD HomeRun Connect Quatro, 1 SiliconDust HDHomeRun Flex Quatro, Amped Antenna w/ splitter.
Pages: [1]   Go Up