Automaticaly Start A Program Minimized doesn't work

Page 1 of 2 12 LastLast

  1. Posts : 15
    Windows 10 x64
       #1

    Automaticaly Start A Program Minimized doesn't work


    I've read this old thread:
    How To Automaticaly Start A Program Minimized

    since I'm facing the same problem (I want to start a couple of apps minimized plus task manager)
    and I tried the following commands but they don't work:

    Code:
    start /min "" "D:\Utilities\PortableApps\XMouseButtonControl\64bit (x64)\XMouseButtonControl.exe"
    start /min "" "C:\Windows\System32\Taskmgr.exe"
    there's another app started with this command:
    Code:
    "C:\Program Files\avs\bin\avscc.exe" --log
    which also shows a popup after login

    looking forward for your help,
    thanks in advance
      My Computer


  2. Posts : 42,963
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2
      My Computers


  3. Posts : 16,932
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #3

    Opening Task manager minimised at startup

    I'm sorry to contradict anybody but do not waste your time even looking at that TechRepublic article - it is from 2004 and it does not work in Windows 10.
    - That old method exploits the lack of security in Windows XP. Windows 10 does not allow elevated tasks to be run in their elevated state at startup because malware would try to exploit any such arrangement.
    - Task manager does not obey normal rules.
    - The best I have achieved** is to have it open automatically minimised to the Taskbar and it then takes a double-click to minimise it to the System tray. See the solution I posted in #16 to start Task manager at Login [the problem having been defined in my post #14] in that thread.
    - My solution involves use of Task scheduler to run an elevated shortcut without prompting for admin permission by using the Run with highest privileges setting. That shortcut lives safely inside a folder group C:\Tools to which only Admins have write [modify] access so it behaves just like folders within C:\Program files - every change needs separate admin approval. {normal Users only have Read, Execute, List permissions}.
    ** Added later - dalchina's method using an AutoHotKey script achieves more than my method does.

    Opening other applications minimised

    The Start /MIN command is pretty ropey and is not being maintained by MS so I am not surpised to see another example of it not behaving itself. If I wanted to start something minimised
    - that did not have its own built-in method and
    - that did not obey the command of a shortcut with the minimised property set and
    - that did not work correctly with Start /Min then
    I would start it by running a vbs command which specified the window as minimised.

    StartNotepadMinimised.vbs
    Code:
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run chr(34) & "C:\Windows\System32\notepad.exe" & Chr(34), 7
    ' this runs minimised


    Denis
    Last edited by Try3; 14 Jun 2019 at 15:21.
      My Computer


  4. Posts : 42,963
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #4

    Hi, I now have a tiny Authotkey script which, when launched from an appropriate scheduled task, automates the whole sequence, so all that is left is the task manager icon in the system tray/ notification area.

    No double-click required- that is emulated, so the task manager is restored and minimised by the script.
      My Computers


  5. Posts : 15
    Windows 10 x64
    Thread Starter
       #5

    Try3 said:
    Opening Task manager minimised at startup

    I'm sorry to contradict anybody but do not waste your time even looking at that TechRepublic article - it is from 2004 and it does not work in Windows 10.
    - That old method exploits the lack of security in Windows XP. Windows 10 does not allow elevated tasks to be run in their elevated state at startup because malware would try to exploit any such arrangement.
    - Task manager does not obey normal rules.
    - The best I have achieved** is to have it open automatically minimised to the Taskbar and it then takes a double-click to minimise it to the System tray. See the solution I posted in #16 to start Task manager at Login [the problem having been defined in my post #14] in that thread.
    - My solution involves use of Task scheduler to run an elevated shortcut without prompting for admin permission by using the Run with highest privileges setting. That shortcut lives safely inside a folder group C:\Tools to which only Admins have write [modify] access so it behaves just like folders within C:\Program files - every change needs separate admin approval. {normal Users only have Read, Execute, List permissions}.
    ** Added later - dalchina's method using an AutoHotKey script achieves more than my method does.

    Opening other applications minimised

    The Start /MIN command is pretty ropey and is not being maintained by MS so I am not surpised to see another example of it not behaving itself. If I wanted to start something minimised
    - that did not have its own built-in method and
    - that did not obey the command of a shortcut with the minimised property set and
    - that did not work correctly with Start /Min then
    I would start it by running a vbs command which specified the window as minimised.

    StartNotepadMinimised.vbs
    Code:
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run chr(34) & "C:\Windows\System32\notepad.exe" & Chr(34), 7
    ' this runs minimised


    Denis
    I tried StartNotepadMinimised.vbs and it didn't work,
    neither for task manager or for other apps
      My Computer


  6. Posts : 42,963
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #6

    Here's the ahk script- really trivial. Just run it from the usual scheduled task- if you have Autohotkey installed, just right click the ahk file, click Compile and you get an exe file. You can play with the timing- I didn't bother experimenting too much.

    run taskmgr.exe,,min
    sleep 2000
    winRestore, ahk_exe taskmgr.exe
    sleep 1000
    WinMinimize, ahk_exe taskmgr.exe
      My Computers


  7. Posts : 15
    Windows 10 x64
    Thread Starter
       #7

    I wouldn't say I'm a fan of that solution,
    also, I'm having another problem too:
    I have to accept the policy twice,
    something should be going wrong there,
    from the event viewer:

    Code:
    The event logging service encountered an error when attempting to apply one or more policy settings.
    
    The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID 
    and APPID 
    to the user SID from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.
    I've sent them to the admins

    and last but not least, it's a shame we can't add our apps to the startup
      My Computer


  8. Posts : 582
    Windows 10 Home
       #8

    For Task Manager, open an Admin command prompt, then type or paste the following into it and press "Enter".

    Code:
    schtasks  /create  /tn  "MyStartups\Task Manager"  /tr  "cmd  /c  start  /min  taskmgr.exe"  /sc  onlogon  /RL highest
    I don't use XMouseButtonControl, but see if this works.

    Code:
    schtasks  /create  /tn  "MyStartups\XMouseButtonControl"  /tr  "cmd  /c  start  /min   """D:\Utilities\PortableApps\XMouseButtonControl\64bit (x64)\XMouseButtonControl.exe""""  /sc  onlogon  /RL  highest

    If the "avscc.exe" program is giving you a UAC prompt at startup, try this.
    Code:
    schtasks  /create  /tn  "MyStartups\avs"  /tr   """"C:\Program Files\avs\bin\avscc.exe""" --log"  /sc  onlogon  /RL highest

    Ben
      My Computer


  9. Posts : 15
    Windows 10 x64
    Thread Starter
       #9

    from all these three only avscc worked properly/fully/completely

    the XMouseButtonControl didn't start, I only got a command prompt with XMouseButtonControl's full path on the title and administrator in front of it

    task manager started but it was sitting on my taskbar (minimized),

    so there is some progress, maybe we're close

    edit: ok, XMouseButtonControl worked with the same way as avscc,
    so it's only task manager left,
    I think "start min" doesn't work properly with the scheduled task
      My Computer


  10. Posts : 582
    Windows 10 Home
       #10

    If you are saying you want Task Manager to start as a normal, visible window, open an Admin command prompt, type or paste the following and press "Enter".

    Code:
    schtasks  /create  /tn  "MyStartups\Task Manager"  /tr  "taskmgr.exe"  /sc  onlogon  /RL highest /f
    Ben
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:30.
Find Us




Windows 10 Forums