Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Aug 2016
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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

    When i do this settings, my application which is in start up folder, application runs when machine restarts every time..
    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

  2. #2

  3. #3
    New Lounger
    Join Date
    Aug 2016
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Attached Images Attached Images

  4. #4
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,594
    Thanks
    5
    Thanked 1,059 Times in 928 Posts
    You need to use a scheduled task to run the app.
    Joe

  5. #5
    New Lounger
    Join Date
    Aug 2016
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp) or not.. My need is whenever the application shortcut is in startup folder then only application should start after restarting th pc.

  6. #6
    Lounger
    Join Date
    Dec 2009
    Location
    Nolensville, TN
    Posts
    46
    Thanks
    1
    Thanked 3 Times in 2 Posts
    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.

  7. #7
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,594
    Thanks
    5
    Thanked 1,059 Times in 928 Posts
    Quote Originally Posted by rajesh12 View Post
    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:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp) 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

  8. #8
    3 Star Lounger djohnson's Avatar
    Join Date
    Dec 2009
    Location
    Delaware City, Delaware
    Posts
    323
    Thanks
    13
    Thanked 32 Times in 30 Posts
    Quote Originally Posted by rajesh12 View Post
    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_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
    "DarkTheme"="C:\\Windows\\System32\\DarkTheme.cmd"
    and the command file looks like this
    Code:
    @echo off
    ThemeSwitcher.exe "%SYSTEMROOT%\Resources\Themes\Windows Black Edition Orange.theme"
    timeout /nobreak /t 3
    taskkill /F /IM explorer.exe
    start explorer.exe
    regedit.exe /S %SYSTEMROOT%\System32\Explorer_Fix.reg
    del %SYSTEMROOT%\System32\Explorer_Fix.reg
    del %SYSTEMROOT%\System32\DarkTheme.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%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
    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%\system32\reg.exe query "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /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
    Files\install.bat

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •