Access windows 10 stopwatch from command line.


  1. Posts : 20
    mrg9999
       #1

    Access windows 10 stopwatch from command line.


    Is it possible to start and stop the windows 10 stopwatch from the command line.

    I can open the app using the shell:startup trick but unless I use autohotkey or powershell (when I might as well use them for a stopwatch package).

    I would like to start the stopwatch when a user logs in and stop when they logout, ideally saving the timeelapsed to a share.

    I am trying to avoid using additional software
      My Computer


  2. Posts : 34,915
    Win 10 Pro (1903) (2nd PC is 21H2)
       #2

    Hi, assuming you are talking about the stopwatch feature of the default UWP Alarms and Clock app, this will launch it in the mode last opened (as far as I've observed):

    explorer.exe shell:Appsfolder\Microsoft.WindowsAlarms_8wekyb3d8bbwe!App
    Thus if you launch the app manually and choose Stopwatch, then this command will launch Stopwatch again.

    Setting the stopwatch may involve changing a setting here:
    The Alarm app settings are stored in \Users\<user>\AppData\Local\Packages\Microsoft.WindowsAlarms_8wekyb3d8bbwe\LocalState\Alarms\ in the Alarms.json file (condensed JSON format)

    As you can't pass parameters to a UWP app (they don't use exe's), you'd be far better off using a free 3rd party program.

    And if all you're after is saving a time difference, you may as well script it anyway...
      My Computers


  3. Posts : 20
    mrg9999
    Thread Starter
       #3

    My company lock down what can and can't be installed and even if I sneak something past they block or uninstall it.

    I found some powershell that does what I want.
    Quick Hits: Create and Start a Stopwatch in One Line | Learn Powershell | Achieve More
      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 07:03.
Find Us




Windows 10 Forums