--- description: If WonderPen cannot open the NUL device on Windows, use a shortcut to resume writing and check whether the Windows Null driver registration needs repair. --- # Windows startup error: Unable to open NUL device Double-clicking WonderPen opens no window. [Starting WonderPen from Command Prompt](./windows-command-prompt.md) shows this error: ```text Unable to open nul device needed for initialization, aborting startup. As a workaround, try starting with --no-stdio-init ``` `NUL` is the Windows null device. Electron, the runtime used by WonderPen, tries to open it while setting up standard input and output. If that step fails, WonderPen exits before opening your Library. One Windows 10 user encountered this after upgrading to WonderPen 3.2. Version 2.6 also failed to start, while 2.3 still opened. Restoring the missing Windows `Null` driver registration and restarting the computer allowed WonderPen to start normally. ## Open WonderPen with a shortcut Right-click the WonderPen desktop shortcut and select **Properties** → **Shortcut**. At the end of **Target**, add a space followed by `--no-stdio-init`. If the path is in quotation marks, put the argument **after the closing quote**. Keep the existing installation path. For example: ```text "C:\Program Files\WonderPen\WonderPen.exe" --no-stdio-init ``` Click **OK** and open WonderPen using that shortcut. The argument skips standard input and output initialization. If WonderPen opens, you can keep using this shortcut and repair Windows later. ## Check for a missing driver registration Press `Win + R`, enter `cmd`, and press Enter to open a regular Command Prompt. **Copy one line at a time and press Enter after each one.** ```bat sc.exe query Null sc.exe qc Null echo NUL_READ_OK NUL && echo NUL_WRITE_OK dir "%SystemRoot%\System32\drivers\null.sys" ``` Check for these three results: - Both `sc.exe` commands return **1060**, saying the specified service does not exist as an installed service. Windows cannot find the `Null` driver registration. - Both `echo` commands report that the system cannot find the file specified. Your account cannot read from or write to `NUL`. - The final command lists **`null.sys`**. The driver file is still on disk. Continue with the repair **if all three results match**. If the driver is already registered, the file is missing, or you see another error such as “Access is denied,” skip the registration step and [contact support](../../contact.md) with the commands and their full output. ## Restore the driver registration 1. Search for `cmd` in the Start menu, right-click **Command Prompt**, and select **Run as administrator**. Verify the Windows driver file: ```bat sfc /verifyfile=%SystemRoot%\System32\drivers\null.sys ``` 2. If Windows reports no integrity violations, run this entire line in the same window. Keep the space after each equals sign: ```bat sc.exe create Null type= kernel start= system error= normal binPath= System32\drivers\null.sys group= Base ``` 3. When you see `[SC] CreateService SUCCESS`, save your work and choose **Restart** in Windows. If file verification or service creation fails, stop at that step and send the error message to support. ## Verify the repair After restarting, open a regular Command Prompt and run each line separately: ```bat sc.exe query Null echo NUL_READ_OK NUL && echo NUL_WRITE_OK ``` The first command should show `4 RUNNING`. The next two should print `NUL_READ_OK` and `NUL_WRITE_OK`, respectively. Remove `--no-stdio-init` from the shortcut’s **Target**. If WonderPen is already open, quit it completely, then launch it from the shortcut. The repair is complete when the editor opens normally.