如何使用Windows C以模拟级别启动Bat文件 [英] How to launch Bat file in Impersonate level using windows C
本文介绍了如何使用Windows C以模拟级别启动Bat文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在使用CreateProcessAsUser启动Exe.但是如果尝试启动Bat文件,它将失败.
我在该函数中使用ImpersonateLoggedOnUser()API.
如何以模拟级别启动Bat文件.
Hi all,
i am using CreateProcessAsUser to launch the Exe. but if try to launch Bat file it failed.
i am using the ImpersonateLoggedOnUser() API in that function.
How to launch the Bat file with Impersonate level.
推荐答案
启动.bat文件时,实际上是通过文件类型关联来启动命令外壳程序(例如启动一个浏览器,方法是使用.html文件创建CreateProcessAsUser.
您是否尝试过以Bat文件作为参数启动命令外壳?
When you launch a .bat file, you actually launch the command shell, through file type association (like launching a browser by doing CreateProcessAsUser with a .html file).
Have you tried launching the command shell, with the Bat file as a parameter?
这篇关于如何使用Windows C以模拟级别启动Bat文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文