I started visual studio with admin, and call the CreateProcess function to start pnputil,However, the CreateProcess return error is 2
Why?
I alse try using CreateProcess to call Dism.exe that was OK
I started visual studio with admin, and call the CreateProcess function to start pnputil,However, the CreateProcess return error is 2
Why?
I alse try using CreateProcess to call Dism.exe that was OK
The reason for this error is that 32-bit applications are automatically redirected to the SysWOW64 folder, and the folder does not have pnputil.exe.
You can refer to this thread and the comments below.
So you only need to modify the program to 64 to (x64), or disable the system's file redirection function, and you can call successfully.
Note: After the process is created successfully, you may still receive error 5 (access denied), but don't worry, you can refer to this thread.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
10 people are following this question.