dim filesys set filesys=CreateObject("Scripting.FileSystemObject") If filesys.FileExists("%AppData%\file.exe") Then filesys.CopyFile "%AppData%\file.exe", "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\" End If
Dim objFso, strSourcePath, strDestPath strSourcePath = "%AppData%\file.exe" strDestPath = "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\" Set objFso = CreateObject("Scripting.FileSystemObject") If objFso.FileExists(strSourcePath) then objFso.CopyFile strSourcePath, strDestPath, True End If Set objFso = Nothing
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)