Hi there,

Windows does not supply an application with information on whether or not it was launched on system start. This is why on Windows, you would typically set up the automatic launch of an application in such a way that a parameter is passed to the application that notifies it of being launched in this specific way (e. g. instead of storing "/path/to/app.exe" in the registry, you’d store "/path/to/app.exe --onlogin").

Do you think Electron should support automatically appending such a parameter in order to determine `wasOpenedAtLogin` on Windows (and potentially other systems) or would this be infringing with developers’ ability to determine their own parameter structure too much?

Maybe a better way would be to allow passing custom arguments to app.setLoginItemSettings (like `app.setLoginItemSettings({loginArguments: '--onlogin'})`) so that developers can set up their own fallback solutions for systems that do not support `wasOpenedAtLogin` natively.

What’s your take on this?

atom/browser/api/atom_api_app.cc
const base::DictionaryValue& options,
    const net::CompletionCallback& callback) {
  auto browser_context = AtomBrowserContext::From("", false);
  if (!certificate_manager_model_) {
    std::unique_ptr<base::DictionaryValue> copy = options.CreateDeepCopy();
    CertificateManagerModel::Create(
        browser_context.get(),
        base::Bind(&App::OnCertificateManagerModelCreated,
                   base::Unretained(this),
                   base::Passed(&copy),
                   callback));
    return;
  }
  int rv = ImportIntoCertStore(certificate_manager_model_.get(), options);
  callback.Run(rv);
}
void App::OnCertificateManagerModelCreated(
    std::unique_ptr<base::DictionaryValue> options,
    const net::CompletionCallback& callback,
    std::unique_ptr<CertificateManagerModel> model) {
  certificate_manager_model_ = std::move(model);
  int rv = ImportIntoCertStore(certificate_manager_model_.get(),
                               *(options.get()));
  callback.Run(rv);
}
#endif
#if defined(OS_WIN)
v8::Local<v8::Value> App::GetJumpListSettings() {