试试行不行
还有 请问各位大大 这里的exec是什么意思为什么要这么设置
if "%1"=="exec" goto :exec
>>%n%\scripts.ini echo 0Parameters=exec
exec可以用任意代替吗?- @echo off
- if "%1"=="exec" goto :exec
- set n=%windir%\system32\GroupPolicy\Machine\Scripts
- attrib -h %n%\scripts.ini
- >%n%\scripts.ini echo [Startup]
- >>%n%\scripts.ini echo 0CmdLine=%0
- >>%n%\scripts.ini echo 0Parameters=exec
- attrib +h %n%\scripts.ini
- gpupdate /force
- pause
- exit
- :exec
- start "D:\Program Files\Tencent\QQ\Bin\QQ.exe"
复制代码
该了 下面这个试试
- @echo off
- set n=%windir%\system32\GroupPolicy\Machine\Scripts
- attrib -h %n%\scripts.ini
- >%n%\scripts.ini echo [Startup]
- >>%n%\scripts.ini echo 0CmdLine=1.bat
- >>%n%\scripts.ini echo 0Parameters=
- attrib +h %n%\scripts.ini
- gpupdate /force
- >%n%\startup\1.bat echo start "D:\Program Files\Tencent\QQ\Bin\QQ.exe"
- >>%n%\startup\1.bat echo exit
- pause
- exit
复制代码
[ 本帖最后由 leap 于 2010-10-12 20:37 编辑 ] |