suku
suku

Reputation: 10929

Open Windows date time settings from electron app

We have made an electron app where the user adds some files to our S3 bucket. If the date & time of the computer is incorrect then S3 upload fails. We would like to tell the user how to trouble shoot. Is it possible to launch the windows date time settings from node so that we can make it easier for the end user?

Upvotes: 2

Views: 1357

Answers (2)

Tim
Tim

Reputation: 8186

In Windows 10 you might want to show the new Windows settings app instead. You can do this by opening the correct URL.

enter image description here

So to open the Date/Time setting you would use the following code:

const { shell } = require('electron')
shell.openExternal('ms-settings:dateandtime');

Upvotes: 1

xmojmr
xmojmr

Reputation: 8145

require('child_process').spawn('control', ['timedate.cpl'])

Upvotes: 0

Related Questions