比如当前用户为一个user,我要双击程序文件,让程序自动以administrator身份打开运行。我有administrator的密码,怎么做?急!!!!
解决方案 »
- 怎么能让这个小程序出错后,重新登录接着跑呢?
- bool型方法返回方法本身是什么意思
- index.aspx运行错误,请高手指点!
- 急需:如何把任意类型的文件添加到access数据库ole类型字段?另外还需要读取出来的代码,谢谢
- datagridview修改行及删除行的问题???????
- 没人知道么?再发!!!
- datagridview 某个单元格内的部分单词颜色如何改变
- socket.send时,报“转换缓冲区溢出”错误,是什么原因?
- 请问大家VS2005进展如何,估计什么时候出来呢??
- c#如何修改ie9的临时文件大小的设置。
- C#的程序运行时能够自动播放背景音乐怎么实现
- 小调查:关于.NET Framework 3.0
string sPassword = "123"; Process updateProcess = new Process();
//updateProcess.StartInfo.ErrorDialog = false;
updateProcess.StartInfo.UseShellExecute = false;
updateProcess.StartInfo.RedirectStandardOutput = true; updateProcess.StartInfo.UserName = sUsername;
SecureString password = new SecureString();
for (int i = 0; i < sPassword.Length; i++)
{
password.AppendChar(sPassword[i]);
} updateProcess.StartInfo.Password = password; updateProcess.StartInfo.FileName = @"d:\test\update\update.bat";
updateProcess.StartInfo.WorkingDirectory = @"d:\test\update"; updateProcess.Start();
http://www.szuon.cn/files/RunAs%20Tool%20V1.1.ziphttp://www.szuon.cn/RunAs%20tool.html