opening files at a certain time

Christopher Trexler 21 Reputation points

I would like to know if there is a Powershell ISE command to schedule a .flac file to open at a specific time (and a cancel command)

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,448 questions
{count} votes

Accepted answer
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 33,946 Reputation points Microsoft Vendor


    You can register a scheduled task using the Register-ScheduledTask cmdlet.

    $Time = New-ScheduledTaskTrigger -At 12:00 -Once  
    $User = "Contoso\Administrator"  
    $PS = New-ScheduledTaskAction -Execute "C:\folder\a.flac"  
    Register-ScheduledTask -TaskName "openflac" -Trigger $Time -User $User -Action $PS  

    To cancel the task run Unregister-ScheduledTask

    Unregister-ScheduledTask -TaskName "openflac"  

    Best Regards,
    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. Andreas Baumgarten 103.3K Reputation points MVP

    hi @Christopher Trexler ,

    maybe this will help:

    Start-Process -Filepath "vlc.exe something.flac"  
    Stop-Process -Name "vlc"  

    Create scripts (start and stop script) and use the Task Scheduler to schedule the scripts.


    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Andreas Baumgarten

    0 comments No comments

  2. Rich Matheisen 45,671 Reputation points

    If you can't run scripts you posted in the wrong area! :-)

    You can try this, though: how-create-task-using-task-scheduler-command-prompt

  3. Rich Matheisen 45,671 Reputation points

    You can run SCHTASKS from the PowerShell shell as well as from the cmd shell. Start Powershell with "run as administrator".

    Seems like you're trying to subvert the admin's blocking you from doing things. Why not discuss this with that person?