How To Run Task If *Not* Connected To Specific Network?

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 30
    Windows 10
    Thread Starter
       #11

    3.1 I want the whole process to be as invisible and hands-off as possible. I think we've reached that point with the batch command and having the EZ Connect minimised, ideally I just the EZ Connect window to close after 10 seconds.
    Ending the process will unmount the drive, so I just need the window closed and the program will continue to run in the background with an icon remaining visible in the notifications section of the taskbar.

    3.2 Yeah, it takes around 11 seconds after opening the program for the drive to mount, so we can give it 15 seconds to be safe

    3.3 Yep, it's 'EasyConnect.exe' :)
      My Computer


  2. Posts : 12,007
    Windows 10 Home x64 Version 21H2 Build 19044.1826
       #12

    3.1 I do not know how to "hide" the EZ window after it has started.
    - The terminology is "hide" not "close".
    - I know how to make it run hidden all the time.
    - If you used the guidance in Make Task scheduler run a batch file minimised and with a specific icon - TenForums then I can suggest a small alteration to the vbs file involved so that it runs hidden all the time.
    - If you did not use that guidance then please tell me how you are triggering the batch file so I can think about how to interupt it with a vbs file that achieves the run hidden objective.

    3.2 But if EZ has an option in its settings to make it appear in the Notifications area [SysTray] then perhaps you can set that from the start.

    Denis
      My Computer


  3. Posts : 30
    Windows 10
    Thread Starter
       #13

    3.1 Ah hide, ok thanks! Running it hidden all the time should be fine, this is currently how EZ Connect functions, just to give you a better idea: https://puu.sh/G9lQ2/edccaecac7.mp4

    3.2 It appears in the notifications tray by default, which makes the actual window redundant for my use-case. Weirdly though, there's an option to have EZ Connect run at start-up, which when enabled it does (icon present in notifications tray) but the drive never attempts to connect - you have to open the window and connect it manually. I guess it never triggers the part of the program where the bar appears (mounting the drive - as seen in the video) if run at start up...
      My Computer


  4. Posts : 12,007
    Windows 10 Home x64 Version 21H2 Build 19044.1826
       #14

    Applications that have a minimise to the Notifications area capability follow their own rules that scripts, such as batch files, cannot normally emulate.
    - If it cannot do its job in this minimised to the Notifications area state then all you will be able to achieve is having it minimised on the Taskbar [which is what I think you have said you are now achieving with the batch file].
    - You might look through its help documentation / support site / user forum [if any] to see if there is an option such as a command line switch to minimise to Notification area when the job has been done but, if not, I do not expect you to be able to make any further progress.

    I experimented for ages with minimising Task manager to the Notification area at user logon. It also follows its own [unknown, internal] rules. The closest I was ever able to achieve was to start it minimised to the Taskbar. Luckily, Task manager's own rules allow me then to double-click on its Taskbar icon and that minimises it to the Notification area instead.

    Denis
      My Computer


  5. Posts : 12,007
    Windows 10 Home x64 Version 21H2 Build 19044.1826
       #15

    3.1 Running it hidden all the time means you will probably not see it at all - forcing it to be hidden will not let it be seen at all. It's worth trying if you want to.

    Try3 said:
    - If you used the guidance in Make Task scheduler run a batch file minimised and with a specific icon - TenForums then I can suggest a small alteration to the vbs file involved so that it runs hidden all the time.
    - If you did not use that guidance then please tell me how you are triggering the batch file so I can think about how to interupt it with a vbs file that achieves the run hidden objective.
    {That mp4 is still downlaoding}

    Denis
      My Computer


  6. Posts : 30
    Windows 10
    Thread Starter
       #16

    3.1 Oh sorry, I am indeed using that VBS file
      My Computer



  7. Posts : 12,007
    Windows 10 Home x64 Version 21H2 Build 19044.1826
       #17

    Open the vbs in Notepad [right-click, Edit] and change the line ending
    , 7
    to
    , 0
    and that will make it run hidden.

    Code:
    Set WshShell = CreateObject("WScript.Shell")
    WshShell.Run chr(34) & "C:\Tools\ThisBatch\ThisBatch.lnk" & Chr(34), 0
    Set WshShell = Nothing
    You will need to check that EZ still does its job when it runs hidden.

    {That mp4 downloaded eventually - I did not see anything that affects the situation}

    Denis
      My Computer


  8. Posts : 30
    Windows 10
    Thread Starter
       #18

    Cheers, I just tried that and it's still just running minimised though

    - - - Updated - - -

    Ah! I'm guessing it's just running the batch command hidden right as opposed to EZ Connect?

    Here's a video of my current set-up: https://puu.sh/G9mtF/ad396b0be0.mp4
    The video's shorter so hopefully it's not a nightmare to see (the video just plays in a Chrome tab for me)
      My Computer


  9. Posts : 12,007
    Windows 10 Home x64 Version 21H2 Build 19044.1826
       #19

    I think its own internal workings must be preventing it running hidden then. I would not expect there to be a solution.
    Hold on, I'll post again in a minute.

    Different subject
    The background in your mp4 makes me think that you are using desktop folders as a menu system. You might prefer to use a Taskbar Toolbar
    Taskbar Toolbars - Creating and naming, customising, moving [post #20] - TenForumsTutorials

    Denis
      My Computer


  10. Posts : 30
    Windows 10
    Thread Starter
       #20

    Thanks! :)
      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 20:22.
Find Us




Windows 10 Forums