Help Needed with Command Sequence


  1. Posts : 526
    Windows 10 (22H2)
       #1

    Help Needed with Command Sequence


    I have 2 shortcut icons :

    1. netsh wlan connect name="InternetProviderXxXxX"

    2. "C:\Program Files\Rainmeter\Rainmeter.exe" !RefreshApp

    I want to combine these two into a single execute. However, item 2 MUST execute 10 seconds AFTER item 1. I suppose I can combine these via a .bat file, however, I know not how or what to structure the file to insure item 2 executes 10 seconds after item 1.

    I would then create a new shortcut and or custom key to do this.

    -thx 4 helping
    Last edited by MourningStar; 26 Jul 2021 at 23:10.
      My Computer


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

    resolved with adding the timeout command in the batch file.

    new issue : how do I prevent/suppress the command window from appearing?
      My Computer


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

    Two ways:

    A. Here's how I chose to do that with a scheduled bat file:
    Help Needed with Command Sequence-1.jpg

    B: More (other ways): (winhelpline link) - which includes the above..
    Please Wait... | Cloudflare

    Note: using Autohotkey (free) for simple things is easier in this respect.
      My Computers


  4. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #4

    Hello @MourningStar,

    [1] Yes, to delay the execution of the next command you can use timeout /t 10 /nobreak >nul

    [2] If I understand correctly, to suppress [ Minimize ] the CMD Prompt you could use this start /min. This will however, Minimize it to the Taskbar.

    Also, have a look at this . . .

    > How To Always Open Shortcut as Normal window, Minimized, or Maximized in Windows 10

    I hope this helps.
    Last edited by Paul Black; 27 Jul 2021 at 02:19.
      My Computer


  5. Posts : 7,606
    Windows 10 Home 20H2
       #5

    MourningStar said:
    resolved with adding the timeout command in the batch file.

    new issue : how do I prevent/suppress the command window from appearing?
    VBScript will stop the window appearing.

    CreateObject("wscript.shell").Run("""X:\A folder\A subfolder\MourningStar.bat"""),0

    The zero 0 at the end denotes no window.
      My Computer


  6. Posts : 526
    Windows 10 (22H2)
    Thread Starter
       #6

    thx all - I learned that selecting the 'minimized' option in the Run section of the shortcut's Properties resolves the cmd window issue.
      My Computer


  7. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #7

    MourningStar said:
    thx all - I learned that selecting the 'minimized' option in the Run section of the shortcut's Properties resolves the cmd window issue.
    You are VERY welcome.
      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 00:23.
Find Us




Windows 10 Forums