0

I have created a task in Task Scheduler for the Microsoft Sticky Notes app downloaded from the Microsoft Store, to open 30 seconds after I turn on my PC and enter the Desktop, but in order for this task to work I need to always remember to manually 'close' the Microsoft Sticky Notes app on my Taskbar before actually shutting down my PC.

If I don't manually 'close' the Microsoft Sticky Notes app that's on the taskbar - the very next time I turn on my PC and enter the Desktop - the Sticky Notes I have on my Desktop launch instantly by default, which is something I don't want. I only want the Sticky Notes to launch 30 seconds AFTER I turn on the PC and enter the Desktop.

In Registry Editor under: Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace\Notes > LaunchOnNextUserSession every time I modify the 'value data' to 0 it always resets to 1.

So is there a way to automate whenever I click: 'Shut Down' for the Microsoft Sticky Notes app to firstly 'close' ever so shortly before the PC itself actually shuts down?

2
  • Does it show up in Task Manager under Startup? You might be able to disable it from running automatically, and then your task would always be the only thing to start it. If you only close it from a task, the reg value will not get set back to zero
    – Cpt.Whale
    Commented Jan 12 at 20:31
  • Hi David. No, the Sticky Notes app is NOT THERE under Task Manager > Startup Tab. Even when I go to Settings > Startup Apps the Sticky Notes app is also NOT THERE either. Do you have any suggestions? Commented Jan 13 at 3:59

1 Answer 1

0

You can try creating a shutdown script following these steps:

  • Export the registry key to a file: C:\myscript\Notes.reg
  • Open the local group policy editor: Run (win+R) gpedit.msc
  • Navigate to: Computer Configuration / Windows Settings / Scripts (Startup/Shutdown) / Shutdown.
  • In the Shutdown Properties dialog, add the script file to execute on shutdown: C:\myscript\Notes.bat
  • In your script file, add:
taskkill /F /IM Microsoft.Notes.exe
reg import "C:\myscript\Notes.reg"

Then test by shutting down and restarting

2
  • Hi there. I'm a little confused on the first step. How exactly do I export the C:\myscript\Notes.reg registry key to a file? I cannot find the: C:\myscript\Notes.reg in Registry Editor. Commented Jan 21 at 6:15
  • @BradHarper export the key in your question: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\PenWorkspace\Notes when the value is 0 to a .reg file. The folder C:\myscript\ is just an example location to put your script and reg file.
    – Cpt.Whale
    Commented Jan 22 at 15:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .