开发者

Process.Start() in C# does not work for non-admin users

I am trying to run explorer.exe to open a开发者_如何学运维 folder and I am using System.Diagnostics.Process to do that.

It works fine if the application is ran by a user who has admin privileges but fails if the user is not an admin.

I have tried: - running it by supplying a ProcessStartInfo. - Getting the explorer.exe process from the local machine and running it using that. - Running it on IExplore.exe.

Nothing of the above worked for non-admin users. ProcessStartInfo lets you prompt for admin credentials but that's undesirable because many users are not admins..

I know I can make this work by using some native methods (I've tried it), SHOpenFolderAndSelectItems, but I don't really want to use native code..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜