Author Topic: Windows 10 workaround for auto array startup  (Read 1405 times)

Offline DarkKnight

  • Jr. Member
  • **
  • Posts: 51
  • Karma: +1/-0
    • View Profile
Windows 10 workaround for auto array startup
« on: August 19, 2016, 01:13:39 pm »
Found a workaround today while Brahim continues to drag his ass on this issue.

Screenshots below.

  • Install FlexraidCMD to c:\Program File\Flexraid\CMD (can find it on the bottom of the download page)
  • Create batch file (e.g. c:\Flexraidstart.bat)
  • Insert into batch file: c:\progra~2\FlexRAID\CMD\FlexRAIDCMD localhost - - view class1_0 start
  • Save and close Batch
  • Create new scheduled task in Windows
    • Select 'Run whether user is logged in or not' Note:Admin user account probably required
    • Check 'Run with highest Privileges'
    • Set Trigger to Startup
    • Set Actions 'Start a Program' -- c:\flexraidstart.bat
    • No Conditions, uncheck everything to ensure it always runs
    • Settings
      • Check Allow task to be run on demand
      • Uncheck everything else
      • In the bottom drop down box select 'Do not start a new instance'
    • Select OK to task window then Close task scheduler
    • Restart and verify if it worked

This works for me, and Flexraid starts as it used it. Windows 10 has been out for over a year. I'm honestly so sick of the lack of progress to even basic bug fixes to F/R.

Edit: I've discovered an Admin permissions issue with this. The FlexraidCMD will throw an error unless run with Admin privs. There is a utility called 'elevate' that resolves this. For FlexraidCMD to work correctly it also requires that for the task you use the "Start in" option under 'Actions' and specify 'C:\Program Files (x86)\Flexraid\CMD' to launch correctly.

https://github.com/jpassing/elevate/releases/download/1.0/elevate.zip

My case is a little bit different than above, because I use a large startup script to autorun flexraid correctly, and it stages launching a lot of services that depend on each other to run in a specific order, starting with the Flexraid pool being fully available first. It includes several consoles sessions that I need visible on my desktop. I was able to get everyone to run without a hassle using the "Run whether user is logged in or not" but the console sessions were hidden regardless. This doesn't work for me, and I had to limit it to user being logged in. This doesn't work easy with a password protected machine which is required because W10 Remote desktop doesn't work correctly unless the host has a password. Problems on top of problems. Seems like the final solution for me will require an auto login to trigger the script correctly.

I'm doing my best to make the instructions generic enough to apply to everyone, but YMMV, and as with all things Flexraid, will require some effort on your part to get it working correctly. This should at least put you on the right path if you want your services to startup without a major delay like using delayed start in the services panel.
« Last Edit: August 20, 2016, 02:42:07 pm by DarkKnight »