Forum Discussion

oldyguy's avatar
oldyguy
Copper Contributor
Jun 11, 2022

Is it possible to launch a browser with task scheduler as system account?

Hi everyone, I hope you can help:

Is it possible to launch a browser,
to open a web page that works in get mode
using powershell on task scheduler,
running as system account to avoid screen updating,
every time any user is logging in,
and then, after the url responds,
close the browser gracefully (other than killing it)?

 

  • "that works in get mode using powershell on task scheduler" You have to give some more detail, do you wnat to download/invoke something when a user logs in? You can start things at user login, but not as system login...
    • oldyguy's avatar
      oldyguy
      Copper Contributor
      ok, I know what do I need, but how to do it... I'll try to clarify the scenario:
      1) use task scheduler whenever a user logs in, to run powershell minimized or hidden
      2) powershell must get some data
      3) powershell must launch a browser minimized or hidden
      4) browser must point to an url that runs in get mode (https://...?data1&data2...)
      5) browser must be terminated gracefully (not being killed or abandoned)
      6) use system account to avoid password change issues if possible

      Actually, this is what I got:
      1) done, except by running minimized or hidden
      2) done
      3) browser launch done, but not minimized or hidden
      4) done
      5) I need help to:
      a) get hwnd in start-process
      b) set its window size to a minimum or better yet, hidden
      c) send keys (%{F4}) or better yet, a message to close browser
      6) donĀ“t know if it works

      if something needs clarification, please let me know.
    • oldyguy's avatar
      oldyguy
      Copper Contributor
      hi Newbie_Jones it looks promising... I'm starting to think I'm reinventing the wheel because I'm a rookie on all this web mumbo-jumbo
      I'll post my results asap, thx a lot.

Resources