Win32Exception: The directory name is invalid

后端 未结 6 568
故里飘歌
故里飘歌 2020-12-15 23:03

I\'m trying to run a process as a different user that has Administrator privilege in 2 different computers running Vista and their UAC enabled but in one of them I get a Win

6条回答
  •  醉梦人生
    2020-12-15 23:09

    Is the directory the logged-on user's mapped home folder or below that? Than this knowledge base article might help:

    "The directory name is invalid" error message when you start Cmd.exe or Notepad.exe by using the Run as feature in Windows

    Update: Please note that being member of the Local Administrators group and having administrative privileges are not the same on Vista.

    I suppose that everything works fine when you run your C# application as administrator. Right-click the executable, then choose Run as Administrator, or start the application from an elevated command prompt (the fastest way to get one is by pressing Start, enter 'cmd' followed by Ctrl+Shift+Return).

    Or, as an alternative, disable UAC for the account running that process.

提交回复
热议问题