此VBS代码用于复制文件。它工作得很好,只有一个问题。我无法将文件复制到启动文件夹。它没有错误信息,只是根本不工作。
strUser = CreateObject("WScript.Network").UserName
source= "l2.vbs"
destination = "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp"
Dim oShell, source, destination
Set Shell = WScript.CreateObject("WScript.Shell")
Shell.Run "xcopy.exe " & source & " " & destination & " /R /Y"
Set Shell = Nothing