问题解决了:- Set oWshShell = CreateObject("WScript.Shell")
- Set oWshShortcut = oWshShell.CreateShortcut("D:\桌面\Desktop\关机.lnk")
- Dim fso, MyFile
- Set fso = CreateObject("Scripting.FileSystemObject")
- Set MyFile = fso.CreateTextFile("#.txt", True)
- MyFile.WriteLine(oWshShortcut.TargetPath)
- MyFile.Close
复制代码 ********************************************************
问题:
已有代码:- Set oWshShell = CreateObject("WScript.Shell")
- Set oWshShortcut = oWshShell.CreateShortcut("D:\桌面\Desktop\关机.lnk")
- MsgBox oWshShortcut.TargetPath
复制代码 运行后,能够显示 D:\桌面\Desktop\关机.lnk 所指的目标:D:\1绿色软件\bat批处理\注销+重新启动\关机.bat
********************************************************************************
现在希望:
运行以后,没有任何显示、没有对话框,直接将结果保存为:#.txt
谢谢 |