找回密码
 加入
搜索
查看: 1847|回复: 0

[AU3基础] 希望高手给予指点 WINDOWS7添加启动菜单代码

[复制链接]
发表于 2010-3-16 13:06:36 | 显示全部楼层 |阅读模式
RunWait(@ComSpec & ' /c bcdedit /create /d "安装一键还原精灵装机版" /application bootsector >c:\windows\vidadd.ini', "", @SW_HIDE)

$text = FileRead("c:\windows\vidadd.ini")

$yjhytil = StringReplace($text, @CRLF, "")

$yjhytil1 = StringReplace($yjhytil, "项", "")

$yjhytil2 = StringReplace($yjhytil1, "成功创建。", "")

RunWait(@ComSpec & " /c bcdedit /set " & $yjhytil2 & " device partition=c:", "", @SW_HIDE)

RunWait(@ComSpec & " /c bcdedit /set " & $yjhytil2 & " path \gvldr.mbr", "", @SW_HIDE)

RunWait(@ComSpec & " /c bcdedit /displayorder " & $yjhytil2 & " /addlast", "", @SW_HIDE)

RunWait(@ComSpec & " /c bcdedit /default " & $yjhytil2, "", @SW_HIDE)

RunWait(@ComSpec & " /c bcdedit /timeout 8", "", @SW_HIDE)

FileDelete("c:\windows\vidadd.ini")
希望高手给予指点 让代码更灵活 最好不产生临时文件!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-25 21:38 , Processed in 0.088269 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表