Windows 10: How to start ClickOnce Program using Task Scheduler

Discus and support How to start ClickOnce Program using Task Scheduler in Windows 10 Gaming to solve the problem; I'm trying to start a clickonce application from the task scheduler but nothing I try works.Using a simple exaple as... Discussion in 'Windows 10 Gaming' started by seltix, Apr 11, 2025.

  1. seltix Win User

    How to start ClickOnce Program using Task Scheduler


    I'm trying to start a clickonce application from the task scheduler but nothing I try works.Using a simple exaple as runningC:\Windows\System32\rundll32.exe dfshim.dll,ShOpenVerbApplication http://domain.tld/MyApp.applicationIf I run the command from Run or from a command prompt it works but if run it from task scheduler it does not workTask actions:Action: Start a programProgram/script: C:\Windows\System32\rundll32.exeAdd arguments: dfshim.dll,ShOpenVerbApplication http://domain.tld/MyApp.applicationI also try to move the call of clickonce into a bat and same result, If I run the bat it works

    :)
     
    seltix, Apr 11, 2025
    #1

  2. How to start ClickOnce Program using Task Scheduler

    I have tried several different techniques to start a ClickOnce application using Windows 10 Task Scheduler. None of them are satisfactory. For some of the attempts, the program doesn't seem to start (There is no indication in Event Log or Task Schedule History
    that there was an error and the output file is not created). For other attempts, the program starts, creates the output file and then never terminates.

    Windows 10 Version 1909 (OS Build 18363.657)

    Here are the attempts that I made to discover a solution:

    __________________________________________________________________________________________________

    Doesn't work at all. Task Scheduler says it is running but it is not running. Program does not execute.

    Program:

    cmd.exe

    CommandLine:

    /c "C:\Users\MyUserName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Publisher Name\Suite Name\MyAppName.ms-appref"

    __________________________________________________________________________________________________

    Doesn't work at all. Task Scheduler says it is running but it is not running. Program does not execute.

    Program:

    cmd.exe

    Arguments:

    /c C:\Users\MyUserName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Publisher Name\Suite Name\MyAppName.ms-appref

    __________________________________________________________________________________________________

    Program runs and creates output file. In Task Manager, can see that it ran the correct version of the EXE. The EXE never terminates.

    Program:

    rundll32.exe

    Arguments:

    dfshim.dll,ShOpenVerbApplication https://mywebsite.com/ClickOnceDir/MyAppName/MyAppName.application

    __________________________________________________________________________________________________

    Program runs and creates output file. In Task Manager, can see that it ran the correct version of the EXE. The EXE never terminates.

    Program:

    c:\bat\xxx.bat

    Arguments:

    <No Arguments>

    Contents of xxx.bat file:

    Code:
    REM Run the ClickOnce service (DFSVC.EXE) if is is not already running
    
    tasklist /NH /FI "IMAGENAME eq dfsvc.exe" 2>NUL | find /I "dfsvc.exe">NUL
    
    if errorlevel 1 start "" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\dfsvc.exe"
    
    REM Run the MyAppName ClickOnce application - Calendar icon should show for a moment in the task bar
    
    "%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\My Publisher Name\My App Directory\MyAppName.appref-ms"
    __________________________________________________________________________________________________

    The EXE never terminates. The program shows in Task Manager but doesn't create the output file. In Task Manager, it shows that C:\Windows\System32\OpenWith.exe was run with the parameter: ""C:\Users\MyUserName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Publisher
    Name\Suite Name\MyAppName.ms-appref""

    Program:

    "C:\Users\MyUserName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Publisher Name\Suite Name\MyAppName.ms-appref"

    Arguments:

    <No Arguments>
     
    BrooklynParkMikey, Apr 11, 2025
    #2
  3. Task Scheduler service will not start.

    Thank you for updating us. If Task Scheduler will not start, we suggest that you restart it. The service might be disabled that's why the task will not run. Follow the steps below to troubleshoot Task Scheduler.

    • Click Start menu.
    • Type Services in the Start Search box.
    • Right-Click Services, and select Run as Administrator.
    • If you are prompted for an administrator password or confirmation, type your password or click
      Continue.
    • Right-click the Task Scheduler Service and select Restart.
    And have you tried running the System File Checker scan as an Administrator. For more information check this
    article. You can also perform DISM after performing SFC.

    Let us know if you need further assistance.
     
    Reymichael Ros, Apr 11, 2025
    #3
  4. How to start ClickOnce Program using Task Scheduler

    Task Scheduler service will not start.

    ok, first, Restart is grayed out when i try to right click, only start is available. every time i select that i get the same "The Task Scheduler Service on Local Computer started and then stopped. Some
    services stop automatically if not in use by other services or programs" message.

    already tried SFC before asking, did not work. tried DISM, and that solved nothing.
     
    grimdragon2001, Apr 11, 2025
    #4
Thema:

How to start ClickOnce Program using Task Scheduler

Loading...
  1. How to start ClickOnce Program using Task Scheduler - Similar Threads - start ClickOnce Program

  2. How to start ClickOnce Program using Task Scheduler

    in Windows 10 Software and Apps
    How to start ClickOnce Program using Task Scheduler: I'm trying to start a clickonce application from the task scheduler but nothing I try works.Using a simple exaple as runningC:\Windows\System32\rundll32.exe dfshim.dll,ShOpenVerbApplication http://domain.tld/MyApp.applicationIf I run the command from Run or from a command...
  3. How do I use Task Scheduler to start a program minimized?

    in Windows 10 Gaming
    How do I use Task Scheduler to start a program minimized?: I'm trying to start CUPID HWMonitor to start minimized on login. I can start it minimized through the shortcut properties, and I can start it poped-up on login, but I can't get it to start minimized through Task Scheduler. Using /background or start/ min does not work either....
  4. How do I use Task Scheduler to start a program minimized?

    in Windows 10 Software and Apps
    How do I use Task Scheduler to start a program minimized?: I'm trying to start CUPID HWMonitor to start minimized on login. I can start it minimized through the shortcut properties, and I can start it poped-up on login, but I can't get it to start minimized through Task Scheduler. Using /background or start/ min does not work either....
  5. How do I use Task Scheduler to start a program minimized?

    in Windows 10 Customization
    How do I use Task Scheduler to start a program minimized?: I'm trying to start CUPID HWMonitor to start minimized on login. I can start it minimized through the shortcut properties, and I can start it poped-up on login, but I can't get it to start minimized through Task Scheduler. Using /background or start/ min does not work either....
  6. How to have Task Scheduler start a program after another program is started

    in Windows 10 Gaming
    How to have Task Scheduler start a program after another program is started: Is there a way to have the task scheduler start a program after it has started a previous program?for instance, I'm running a dedicated DCS server on my computer and have setup the task scheduler to restart the computer everyday at 2 AM. I then have another task stating that...
  7. How to start ClickOnce Program using Task Scheduler

    in Windows 10 Customization
    How to start ClickOnce Program using Task Scheduler: I have tried several different techniques to start a ClickOnce application using Windows 10 Task Scheduler. None of them are satisfactory. For some of the attempts, the program doesn't seem to start There is no indication in Event Log or Task Schedule History that there was...
  8. How to start ClickOne Program using Task Scheduler

    in Windows 10 Customization
    How to start ClickOne Program using Task Scheduler: I have tried several different techniques to start a ClickOnce application using Windows 10 Task Scheduler. None of them are satisfactory. For some of the attempts, the program doesn't seem to start There is no indication in Event Log or Task Schedule History that there was...
  9. Start/stop a program in Task Scheduler

    in Windows 10 Customization
    Start/stop a program in Task Scheduler: I want to launch a particular program after another program has loaded, and terminate that particular program after closing that other program. Any idea how this would work in Task Scheduler? Thank you....
  10. Task Scheduler: Start a Program with Office

    in Microsoft Office and 365
    Task Scheduler: Start a Program with Office: Does anyone know how to have Task Scheduler start a program to run with the launch of ANY Office application? I have a registry edit which will enable the black theme in Office 2016. It needs to be run each time any Office app opens. I can do this on an individual basis, or...