• My Application which is in Start up folder is not running after restart

    Home » Forums » AskWoody support » Windows » Windows 10 » Questions: Win10 » My Application which is in Start up folder is not running after restart

    Author
    Topic
    #506554

    My application which is in Startup folder is not started after restarting the computer. I find some solutions on internet like
    1. Hkey_Local_Machine Software Microsoft Windows CurrentVersion Policies System Set EnableLUA to 0 (See at right side – By Default it is set to 1)
    2. Set User Access Control settings to lowest level
    [/FONT]
    [/COLOR]
    When i do this settings, my application which is in start up folder, application runs when machine restarts every time..
    [/COLOR][/FONT][/COLOR][/SIZE]But this setting inhibit the operation of some MS programs like MS-Edge, Photo-Viewer, Skype Video etc. Resetting to default “1” and restart PC would resolved it. Please guide me with better solution

    Viewing 1 reply thread
    Author
    Replies
    • #1573859
      • #1573971

        Let me put up my problem in a different way:
        1. My team has developed a windows (C# WPF) application. This application requires elevated privileges to execute. (right click on app –> “Run as administrator” even for an administrator user). This application need to run at startup occasionally (depending on user preferences).
        2. When user selects to run the application on windows startup, the application creates its shortcut in the “startup folder” of the windows.
        3. As this application needs administrative privileges to start running, we have made the setting as shown in the attachment image.
        Problem : With this UAC settings my application startup automatically whenever configured to start, at boot on windows 7. For windows 10 (I upgraded my PC from windows 7 to windows 10 Pro recently) these settings do not help. When I right click “Run as administrator” on my application from the shortcut in the startup folder, my application works fine.

        • #1574215

          I have a program, Roboform, which has been working for years, most recently with the original WIN10. After the Anniversary upgrade, I now have exactly the same problem and solution. From talking with their tech support, they are aware of the problem, and are researching it. So it looks like something subtle has changed, either by accident or design, and not documented. You may have the only solution for now.

        • #1574996

          Let me put up my problem in a different way:
          1. My team has developed a windows (C# WPF) application. This application requires elevated privileges to execute. (right click on app –> “Run as administrator” even for an administrator user). This application need to run at startup occasionally (depending on user preferences).
          2. When user selects to run the application on windows startup, the application creates its shortcut in the “startup folder” of the windows.
          3. As this application needs administrative privileges to start running, we have made the setting as shown in the attachment image.
          Problem : With this UAC settings my application startup automatically whenever configured to start, at boot on windows 7. For windows 10 (I upgraded my PC from windows 7 to windows 10 Pro recently) these settings do not help. When I right click “Run as administrator” on my application from the shortcut in the startup folder, my application works fine.

          Have you tried the RunOnce registry edit. I use this with a batch file for new installations. This is just a small part of it, but the registry entry (change for your needs) is this

          Code:
          HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRunOnce]
          "DarkTheme"="C:\Windows\System32\DarkTheme.cmd"

          and the command file looks like this

          Code:
          @echo off
          ThemeSwitcher.exe "%SYSTEMROOT%ResourcesThemesWindows Black Edition Orange.theme"
          timeout /nobreak /t 3
          taskkill /F /IM explorer.exe
          start explorer.exe
          regedit.exe /S %SYSTEMROOT%System32Explorer_Fix.reg
          del %SYSTEMROOT%System32Explorer_Fix.reg
          del %SYSTEMROOT%System32DarkTheme.cmd
          exit

          As you can see from the last line the file is deleted. Here is an example of a batch file which will run another elevated as administrator. This may prove useful to you.

          Code:
          @echo off
          >nul 2>&1 "%SYSTEMROOT%system32cacls.exe" "%SYSTEMROOT%system32configsystem"
          if "%errorlevel%" NEQ "0" (
          	echo: Set UAC = CreateObject^("Shell.Application"^) > "%temp%getadmin.vbs"
          	echo: UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%getadmin.vbs"
          	"%temp%getadmin.vbs" &	exit 
          )
          if exist "%temp%getadmin.vbs" del /f /q "%temp%getadmin.vbs"
          )
          %windir%system32reg.exe query "HKLMSystemCurrentControlSetControlSession ManagerEnvironment" /v PROCESSOR_ARCHITECTURE | find /i "amd64" 1>nul || (
          echo ============================================================
          echo ERROR: This pack is for 64-bit systems.
          echo ============================================================
          echo.
          echo.
          echo Press any key to exit...
          pause >nul
          goto :eof
          )
          %~d0
          cd /d "%~dp0"
          cls
          Filesinstall.bat
    • #1573997

      You need to use a scheduled task to run the app.

      --Joe

      • #1574188

        I did the scheduled task but it always starts an application when we restart the pc whether the application shortcut is in startup folder (C:ProgramDataMicrosoftWindowsStart MenuProgramsStartUp) or not.. My need is whenever the application shortcut is in startup folder then only application should start after restarting th pc.

        • #1574350

          I did the scheduled task but it always starts an application when we restart the pc whether the application shortcut is in startup folder (C:ProgramDataMicrosoftWindowsStart MenuProgramsStartUp) or not.. My need is whenever the application shortcut is in startup folder then only application should start after restarting th pc.

          See if you can add some TRIGGER to the TASK definition that will suit your needs.

          --Joe

    Viewing 1 reply thread
    Reply To: My Application which is in Start up folder is not running after restart

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: