I have all the necessary variables declared that are used in this script. I get path not found error on the line:
oFSO.CopyFile ("*.*"), (DestProgWin7), True
I have tried without parenthesis to no avail for source and path. The script is placed in the path that contains all the files to be copied over. Any help please?
dim oFSO,oShell
dim DestProgXP,DestProgWin7
dim DestStartXP,DestStartWin7
set oFSO = CreateObject ("Scripting.FileSystemObject")
set oShell = CreateObject ("Wscript.Shell")
DestProgXP = ("C:\Program Files\WinZip\")
DestProgWin7 = ("C:\Program Files (x86)\WinZip\")
DestStartXP = ("C:\Documents and Settings\All Users\Start Menu\Programs\WinZip\")
DestStartWin7 = ("C:\Users\All Users\Microsoft\Windows\Start Menu\Programs\WinZip\")
if oFSO.FolderExists("C:\Documents and Settings") Then
oFSO.CopyFile ("*.*"), (DestProgXP), True
oFSO.CopyFile ("*.CHM"), (DestStartXP), True
Else if oFSO.FolderExists("C:\Users") Then
oFSO.CopyFile ("*.*"), (DestProgWin7), True
oFSO.CopyFile ("*.CHM"), (DestStartWin7), True
Else
MsgBox ("This program is only intended for Windows XP x32 or Windows 7 x64.")
End if
End if