win10系统隐藏任意程序运行界面的图文步骤
时间:2021-09-22 17:21:30 来源:www.cnomit.cn 作者:佚名 浏览次数:

方法一:使用VBScript
1、首先以隐藏系统自带的Win32版《写字板》程序为例,在记事本中写入如下代码:
Dim WShell
Set WShell = CreateObject("WScript.Shell")
WShell.Run "wordpad.exe", 0 '后面0的意思是“隐藏”
Set WShell = Nothing
注意,代码第三行后的单引号 ' 是VB中的注释符号 ,其后面的语句没有执行效果。

2、把上述代码保存为.vbs 格式,文件名自拟,如下图——

3、此时双击刚刚保存的vbs文件就可以让写字板“隐身”运行,但我们还是可以在任务管理器中找到进程,如下图——

4、如果想隐身运行第三方程序,则需要修改代码,以软媒魔方(点击下载)的清理大师文件为例,代码如下:
Dim WShell
Set WShell = CreateObject("WScript.Shell")
WShell.Run """" & "D:Program Files (x86)RuanmeiPCMastercleanmaster.exe" & """", 0 '如果路径中含有空格,就需要在路径前后加引号和调用符号,格式为"""" & "路径" & """"
Set WShell = Nothing

5、按照第2步的方式保存后,双击可以查看效果。需要注意的是,如果程序本身需要管理员权限,而且你的系统开启了UAC,权限请求的窗口是无法隐藏的,如下图——

不过在点击“是”之后就不会看到运行界面和任务栏图标了,只能在任务管理器中找到进程,如下图——

6、如果你想用命令提示符来运行这些vbs,可以采用如下命令格式:
wscript "路径文件名.vbs"
实例:
wscript "%userprofile%Desktop新建文件夹 (2)hidewordpad.vbs"

运行效果和双击vbs文件本身是一致的。
方法二:PowerShell
为了方便编辑和在命令提示符中运行,IT之家使用PowerShell ISE来操作。
1、命令格式:
Start-Process -WindowStyle hidden -FilePath 文件路径文件名
实例:
隐身运行系统自带写字板程序:
Start-Process -WindowStyle hidden -FilePath wordpad.exe

隐身运行第三方程序软媒清理大师:
Start-Process -WindowStyle hidden -FilePath 'D:Program Files (x86)RuanmeiPCMastercleanmaster.exe'

可以看出,如果路径中包含空格,只要给路径加单引号,就可以让PowerShell识别出来,较为简洁。
2、如果要在命令提示符中运行,需要把第1步中的命令保存为.ps1文件,文件名自拟,直接在PowerShell ISE中操作即可,如下图——

3、使用命令提示符运行的格式为:
powershell -executionPolicy bypass -file "路径文件名.ps1"
实例:
powershell -executionPolicy bypass -file "%userprofile%Desktop新建文件夹 (2)hide.ps1"

这种方式运行与在PowerShell中运行效果完全相同。
需要注意的是,并非所有应用都“吃这一套” ,比如想隐藏旗鱼浏览器就无法实现,不过浏览器隐藏界面貌似也没太大意义,因为一般来说浏览器都得让用户看得见才有用。
以上就是关于win10系统隐藏任意程序运行界面的操作方法,有碰到这样问题的用户们不妨可以按照上面的方法步骤来进行解决吧,欢迎给小编留言哦!