exe文件通过bat文件写到注册表中

来源:互联网 发布:学泰语软件 编辑:程序博客网 时间:2024/05/18 02:11

@echo off
if exist systray.exe goto setreg
:setreg
echo The Installation Directory is %CD%
echo.
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v myrun /t REG_SZ /d "%CD%\DSOA40\systray.exe" /f
cd..
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v GEOSERVER_HOME /t reg_sz /d "%cd%" /f
echo XXXX安装成功,为使配置生效,请保存好您的应用程序,并重新启动计算机
echo.
pause

 

 

。。bat文件在后台运行不弹窗口。。。

新建text文档然后改成.vbe文件

set ws=wscript.createobject("wscript.shell")
ws.run "run.bat /start",0

原创粉丝点击