|  | 
 
| cnds 初级用户
 
   
 
 
 
 积分 37
 发帖 36
 注册 2008-12-2
 状态 离线
 | 
| 『楼 主』:
 请问将一个程序的快捷方式发送到桌面如何写批处理?
 
使用 LLM 解释/回答一下 
 
 
求大虾帮忙写一个批处理,要求首次进入系统时,删除C:\Documents and Settings\Administrator\桌面\腾讯QQ,然后将:D:\Backup\QQ\QQ.exe的快捷方式发送到桌面上,之后将快捷方式修改成“腾讯QQ”,最后是删除批处理本身。删除批处理文件本身,用del %0可以做到,但是 del C:\Documents and Settings\Administrator\桌面\腾讯QQ不行,用系统变量也不行,郁闷了。另外将D:\Backup\QQ\QQ.exe的快捷方式发送到桌面,这个就更难了。希望大侠不吝赐教。
 
 Last edited by cnds on 2008-12-4 at 10:13 ]
 
Please help the big shot write a batch processing. The requirement is that when entering the system for the first time, delete C:\Documents and Settings\Administrator\Desktop\Tencent QQ, then send the shortcut of D:\Backup\QQ\QQ.exe to the desktop, then modify the shortcut to "Tencent QQ", and finally delete the batch processing itself. 
 Deleting the batch processing file itself can be done with del %0, but del C:\Documents and Settings\Administrator\Desktop\Tencent QQ is not okay, and it doesn't work with system variables. It's really frustrating. Also, sending the shortcut of D:\Backup\QQ\QQ.exe to the desktop is even more difficult. I hope the big shot will kindly give advice.
 
 Last edited by cnds on 2008-12-4 at 10:13 ]
 
 
 
 |  | 
|  2008-12-4 10:08 |  | 
|  | 
 
| HAT 版主
 
         
 
 
 
 积分 9023
 发帖 5017
 注册 2007-5-31
 状态 离线
 | 
| 『第 2 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
你准备用盗号软件替换QQ么? 
Are you going to replace QQ with a hacking software? 
 
 
 
 
 
 |  
                  |  
  |  | 
|  2008-12-4 11:19 |  | 
|  | 
 
| cnds 初级用户
 
   
 
 
 
 积分 37
 发帖 36
 注册 2008-12-2
 状态 离线
 | 
| 『第 3 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
不是啊。我封装了个系统,QQ用的是YLMF修改过的,但是系统安装完毕之后,用那个快捷方式打开的QQ,一动就死住,没法用。但是用腾讯的QQ.exe发送的快捷方式就没有问题。所以我想做个批处理,加入到GHO中。 
No, I encapsulated a system. QQ uses the YLMF-modified one. But after the system is installed, the QQ opened with that shortcut dies when moved and can't be used. But the shortcut sent with Tencent's QQ.exe is fine. So I want to make a batch file and add it to the GHO. 
 
 
 |  | 
|  2008-12-4 11:31 |  | 
|  | 
 
| lianjiang2004 金牌会员
 
       
 
 
 
 积分 3946
 发帖 1884
 注册 2006-1-20
 状态 离线
 | 
| 『第 4 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
下面是我以前用过的。可参考作用:用shortcut.exe把指定目录(d:\ggho)下的gghost.exe在桌面上创建一个“GGhost一键恢复”的快捷键。工作目录为指定的目录。
 
 set ggpath0=d:\ggho
 %ggpath0%\tools\shortcut.exe /f:"%userprofile%"\桌面\GGhost一键恢复.lnk  /a:c /w:%ggpath0%\ /t:%ggpath0%\gghost.exe >nul
 
The following is what I used before. It can be referred to.
 Function: Use shortcut.exe to create a "GGhost One - Click Recovery" shortcut on the desktop for gghost.exe in the specified directory (d:\ggho). The working directory is the specified directory.
 
 set ggpath0=d:\ggho
 %ggpath0%\tools\shortcut.exe /f:"%userprofile%"\Desktop\GGhost One - Click Recovery.lnk  /a:c /w:%ggpath0%\ /t:%ggpath0%\gghost.exe >nul
 
 
 
 
 |  
                  |  Windows 一键还原
 http://www.yjhy.com
 |  | 
|  2008-12-4 12:04 |  | 
|  | 
 
| cnds 初级用户
 
   
 
 
 
 积分 37
 发帖 36
 注册 2008-12-2
 状态 离线
 | 
| 『第 5 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
我写了2个批处理a和b,b放到启动里,a放在%windir%里,启动b之后,会去执行a,但是执行完a之后,程序就结束了,按照设计,执行完a之后,应该再跳回到到b,执行剩余的语句。但是,我不知道怎么弄连接回到b,“C:\Documents and Settings\Administrator\「开始」菜单\程序\启动”的系统变量不会搞。达人指点。a:
 
 Sub bat
 echo off & cls
 echo create_shortcut
 start wscript -e:vbs "%~f0"
 Exit Sub
 End Sub
 
 
 Set WshShell = WScript.CreateObject("WScript.Shell")
 strDesktop = WshShell.SpecialFolders("Desktop")
 set oShellLink = WshShell.CreateShortcut(strDesktop & "\QQ.lnk")
 oShellLink.TargetPath = "D:\backup\QQ.exe"
 oShellLink.WindowStyle = 3
 oShellLink.Hotkey = ""
 oShellLink.IconLocation = "D:\backup\QQ.exe, 0"
 oShellLink.Description = "快捷方式"
 oShellLink.WorkingDirectory = "D:\backup\QQ.exe"
 oShellLink.Save
 
 b:
 
 call %windir%\a.bat
 del C:\Docume~1\Administrator\桌面\腾讯QQ.lnk
 ren C:\Docume~1\Administrator\桌面\qq.lnk 腾讯QQ.lnk
 del %windir%\a.bat
 del %0
 
 a.bat用于把d:\backup\qq\qq.exe的快捷方式发送桌面,这个功能已经实现。我试图在a.bat中,加入call C:\Docume~1\Administrator\「开始」菜单\程序\启动\b.bat,用于实现执行完a.bat后,跳回到b.bat,但是提示缺少语句。大侠帮忙。
 
 Last edited by cnds on 2008-12-4 at 14:23 ]
 
I wrote 2 batch files a and b. Put b in the startup, and put a in %windir%. After starting b, it will execute a. But after a is executed, the program ends. According to the design, after a is executed, it should jump back to b to execute the remaining statements. But I don't know how to connect back to b. I don't know how to handle the system variable "C:\Documents and Settings\Administrator\「Start」Menu\Programs\Startup". Experts, please give guidance.
 a:
 
 Sub bat
 echo off & cls
 echo create_shortcut
 start wscript -e:vbs "%~f0"
 Exit Sub
 End Sub
 
 
 Set WshShell = WScript.CreateObject("WScript.Shell")
 strDesktop = WshShell.SpecialFolders("Desktop")
 set oShellLink = WshShell.CreateShortcut(strDesktop & "\QQ.lnk")
 oShellLink.TargetPath = "D:\backup\QQ.exe"
 oShellLink.WindowStyle = 3
 oShellLink.Hotkey = ""
 oShellLink.IconLocation = "D:\backup\QQ.exe, 0"
 oShellLink.Description = "Shortcut"
 oShellLink.WorkingDirectory = "D:\backup\QQ.exe"
 oShellLink.Save
 
 b:
 
 call %windir%\a.bat
 del C:\Docume~1\Administrator\Desktop\Tencent QQ.lnk
 ren C:\Docume~1\Administrator\Desktop\qq.lnk Tencent QQ.lnk
 del %windir%\a.bat
 del %0
 
 a.bat is used to send the shortcut of d:\backup\qq\qq.exe to the desktop. This function has been realized. I tried to add call C:\Docume~1\Administrator\「Start」Menu\Programs\Startup\b.bat in a.bat to realize that after a.bat is executed, it jumps back to b.bat, but it prompts that there is a missing statement. Great expert, please help.
 
 Last edited by cnds on 2008-12-4 at 14:23 ]
 
 
 
 |  | 
|  2008-12-4 14:20 |  | 
|  | 
 
| cnds 初级用户
 
   
 
 
 
 积分 37
 发帖 36
 注册 2008-12-2
 状态 离线
 | 
| 『第 6 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
用这个批处理就可以了:code:
 Sub bat
 echo off & cls
 echo create_shortcut
 start wscript -e:vbs "%~f0"
 Exit Sub
 End Sub
 
 Set WshShell = WScript.CreateObject("WScript.Shell")
 strDesktop = WshShell.SpecialFolders("Desktop")
 set oShellLink = WshShell.CreateShortcut(strDesktop & "\腾讯QQ.lnk")
 oShellLink.TargetPath = "D:\backup\QQ.exe"
 oShellLink.WindowStyle = 3
 oShellLink.Hotkey = ""
 oShellLink.IconLocation = "D:\backup\QQ.exe, 0"
 oShellLink.Description = "快捷方式"
 oShellLink.WorkingDirectory = "D:\backup\QQ.exe"
 oShellLink.Save
 
 功能是实现了,但是不知道怎么样删除自身,高手请指教。
 
 Last edited by cnds on 2008-12-4 at 17:55 ]
 
Just use this batch:code:
 Sub bat
 echo off & cls
 echo create_shortcut
 start wscript -e:vbs "%~f0"
 Exit Sub
 End Sub
 
 Set WshShell = WScript.CreateObject("WScript.Shell")
 strDesktop = WshShell.SpecialFolders("Desktop")
 set oShellLink = WshShell.CreateShortcut(strDesktop & "\Tencent QQ.lnk")
 oShellLink.TargetPath = "D:\backup\QQ.exe"
 oShellLink.WindowStyle = 3
 oShellLink.Hotkey = ""
 oShellLink.IconLocation = "D:\backup\QQ.exe, 0"
 oShellLink.Description = "Shortcut"
 oShellLink.WorkingDirectory = "D:\backup\QQ.exe"
 oShellLink.Save
 
 The function is achieved, but I don't know how to delete itself. Experts, please give advice.
 
 Last edited by cnds on 2008-12-4 at 17:55 ]
 
 
 
 |  | 
|  2008-12-4 17:53 |  | 
|  | 
 
| HAT 版主
 
         
 
 
 
 积分 9023
 发帖 5017
 注册 2007-5-31
 状态 离线
 |  | 
|  2008-12-4 17:57 |  | 
|  | 
 
| cnds 初级用户
 
   
 
 
 
 积分 37
 发帖 36
 注册 2008-12-2
 状态 离线
 | 
| 『第 8 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
不可以。运行b.bat之后,执行call %windir%\a.bat,但是执行完a.bat后,程序回不到b.bat来了。 
No, after running b.bat, execute call %windir%\a.bat, but after executing a.bat, the program cannot return to b.bat. 
 
 
 |  | 
|  2008-12-4 20:39 |  | 
|  | 
 
| wuxj 初级用户
 
   
 
 
 
 积分 50
 发帖 25
 注册 2007-3-29
 状态 离线
 | 
| 『第 9 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
我认为你事先做好快捷方式复制过去会是最简单的方法。 
I think the simplest way is that you make a shortcut in advance and copy it over. 
 
 
 |  | 
|  2008-12-4 21:34 |  | 
|  | 
 
| cnds 初级用户
 
   
 
 
 
 积分 37
 发帖 36
 注册 2008-12-2
 状态 离线
 | 
| 『第 10 楼』:
 
 
使用 LLM 解释/回答一下 
 
 
建立快捷方式是问题的根源。只要实现这点,其他相对好解决。 
Establishing shortcuts is the root of the problem. As long as this is achieved, other things are relatively easier to solve. 
 
 
 |  | 
|  2008-12-4 21:38 |  |