I had a problem on XP Embedded running a vb-script file with wscript. Creating a shell object and calling the run method gave me a permission denied error (error number '800a0046') even when I was running as administrator. It didn't matter what I was trying to run. Even notepad.exe gave me this error. I've seen more people post questions about similar errors around the internet but I never found a usable answer so I thought I'd share the solution I worked out myself.
Here is the script I was trying to run.
Dim shell
Set shell = CreateObject("WScript.Shell")shell.Run("notepad.exe")All the scripting components were installed so this wasn't the problem. After looking at all kinds of possible security settings I tried the same on an image based on the XP Full Installation by Sean Liming and all was well. Not a security problem after all, just a missing component. Looking at the output from Sysinternals Procmon. Strangely enough wscript.exe was looking at internet zone security settings in the registry just before the error. I tried installing the Internet Explorer component and problem solved.
It seems that wscript needs some internet zone security settings from the internet explorer component to be able to determine what executables it can run.
Hope this can help someone solve the same problem faster.