如何使用每次在C#.Net中启动时创建/删除的临时用户配置文件启动用户定义的进程。 [英] How to launches a user-defined process using a temporary user profile created/removed every time its launch in C#.Net.

查看:76
本文介绍了如何使用每次在C#.Net中启动时创建/删除的临时用户配置文件启动用户定义的进程。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用每次在C#.Net中启动时创建/删除的临时用户配置文件启动用户定义的进程。



必需的输出格式:

ProcessPath ProcessUserName



示例输出:

c:\windows \\\
otepad.exe TestUser

c:\windows \ system32 \ cmd.exe AnotherUser

c:\windows \ system32 \ mspaint.exe YetAnotherUser

How to launches a user-defined process using a temporary user profile created/removed every time its launch in C#.Net.

Required output format:
ProcessPath ProcessUserName

Example output:
c:\windows\notepad.exe TestUser
c:\windows\system32\cmd.exe AnotherUser
c:\windows\system32\mspaint.exe YetAnotherUser

推荐答案

不确定我是否正确理解了您的问题,但是如果您想要启动一个进程并使用其他用户名运行它,您可以使用例如 Process.Start方法(String,String,SecureString,String) [ ^ ]方法。
Not sure if I understood your question correctly, but if you want to start a process and run it using a different username, you can use for example Process.Start Method (String, String, SecureString, String)[^] method.


这是与设计和开发PowerShell脚本,该脚本使用每次创建/删除的临时用户配置文件启动用户定义的流程 [ ^ ]。请不要多次重新发布同一个问题;编辑原文。
This is the same question as Design and develop a PowerShell script that launches a user-defined process using a temporary user profile created/removed every time[^]. Please do not repost the same question multiple times; edit your original.


这篇关于如何使用每次在C#.Net中启动时创建/删除的临时用户配置文件启动用户定义的进程。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆