Цитата:
BoxIn = "\\192.168.100.23\Test1\kuku"
BoxOut = "Z:\Soft_Out"
Flag = BoxOut + "\11.txt"
With CreateObject("Scripting.FileSystemObject")
If Not .FolderExists(BoxOut) Then
MsgBox "Folder" + vbCrLf + vbCrLf + BoxOut + vbCrLf + vbCrLf + "not found"
WScript.Quit 2
End If
If .FileExists(Flag) Then
MsgBox "File" + vbCrLf + vbCrLf + Flag + vbCrLf + vbCrLf + "exists."
WScript.Quit 1
End If
.CopyFolder BoxIn, BoxOut, True
End With
MsgBox "OK"
|
А как можно написать путь чтобы все копировалось в C:\Users\Usersprofile\AppData. Это нужно чтобы можно было обновлять программу на терминальных серверах.
Вот так можно написать путь в BoxOut?
Код:

C:\Users" & username & "\AppData\