Shortcut to Batch File Issue

Page 3 of 4 FirstFirst 1234 LastLast

  1. Posts : 7,699
    22H2 64 Bit Pro
       #21

    MourningStar said:
    The shortcut to this batch file is configured to 'run as admin'.
    That could be why you'll always get a UAC prompt even if you run the shortcut to the batch file elevated.
      My Computer


  2. Posts : 552
    Windows 10 (22H2)
    Thread Starter
       #22

    Thank you all for your help.

    - It seems Option Two of the Elevated Shortcut w/o UAC tutorial is the solution. However, a final, very small issue. The cmd window displays on the desktop and remains displayed upon task completion. So, I added 'exit' to bottom of the code. The cmd window still displayed on the desktop but quickly closed. I then modified the shortcut to run minimized, which I assume causes it to momentarily appear in the taskbar 'only', but it still momentarily appeared on the desktop as before.

    Thoughts?
      My Computer


  3. Posts : 17,101
    Windows 10 Home x64 Version 22H2 Build 19045.5371
       #23

    The solution is to set TS to run a vbs script which runs the minimising shortcut. See
    Make Task scheduler run a batch file minimised and with a specific icon - TenForums
    Then there will be no momentarily appeared on the desktop.


    Denis
      My Computer


  4. Posts : 606
    Windows 10 Home
       #24

    MourningStar said:
    Thank you all for your help.

    - It seems Option Two of the Elevated Shortcut w/o UAC tutorial is the solution. However, a final, very small issue. The cmd window displays on the desktop and remains displayed upon task completion. So, I added 'exit' to bottom of the code. The cmd window still displayed on the desktop but quickly closed. I then modified the shortcut to run minimized, which I assume causes it to momentarily appear in the taskbar 'only', but it still momentarily appeared on the desktop as before.

    Thoughts?
    One possibility is that you created the scheduled task to start the batch file directly instead of going through the shortcut.

    Ben
      My Computer


  5. Posts : 552
    Windows 10 (22H2)
    Thread Starter
       #25

    Ben Myers said:
    One possibility is that you created the scheduled task to start the batch file directly instead of going through the shortcut.

    Ben
    Thx Ben. However, I did follow the shortcut tutorial to the letter. Do you think it is in error to suggest this possibility? I did wonder why it instructs to use the path of the 'application' instead of the path to the shortcut, but I am a nobody to question a well established tutorial. Perhaps you can provide more detail of this 'possibility' you suggest that I may hunt it down.

    Try3 said:
    The solution is to set TS to run a vbs script which runs the minimising shortcut. See
    Make Task scheduler run a batch file minimised and with a specific icon - TenForums
    Then there will be no momentarily appeared on the desktop.

    Denis
    Thank you Denis. I should consider Ben's reply first. If no joy I will try your method and report back.
      My Computer


  6. Posts : 606
    Windows 10 Home
       #26

    If the task starts the batch file directly, the shortcut is out of the picture.

    Ben
      My Computer


  7. Posts : 552
    Windows 10 (22H2)
    Thread Starter
       #27

    Ben Myers said:
    If the task starts the batch file directly, the shortcut is out of the picture.

    Ben
    What can I look for and provide you to confirm?
      My Computer


  8. Posts : 606
    Windows 10 Home
       #28

    It will be in the task scheduler GUI. Double-click the task and look in the "Actions" tab.

    Ben
      My Computer


  9. Posts : 17,101
    Windows 10 Home x64 Version 22H2 Build 19045.5371
       #29

    Task scheduler does not allow a shortcut's Minimise setting to take effect.
    That's why I had to develop the method I gave you a link for.


    Denis
      My Computer


  10. Posts : 552
    Windows 10 (22H2)
    Thread Starter
       #30

    Ben Myers said:
    It will be in the task scheduler GUI. Double-click the task and look in the "Actions" tab.

    Ben
    yes - the path to the task is there, just as the tutorial instructs ...

    Ben Myers said:
    If the task starts the batch file directly, the shortcut is out of the picture.

    Ben
    What do you propose to put it 'in the picture'?
      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 19:31.
Find Us




Windows 10 Forums