Xcopy Help needed!
Hi all,
Basically, I need to copy a file to replace a file that already exist on the pc.
What is the best way to go about this? As currently I am using a Custom Command to call a batch file which using Xcopy. But for some reason I can not get it to work.
Any suggestings will be great.
Thanks
Damian
Basically, I need to copy a file to replace a file that already exist on the pc.
What is the best way to go about this? As currently I am using a Custom Command to call a batch file which using Xcopy. But for some reason I can not get it to work.
Any suggestings will be great.
Thanks
Damian
0 Comments
[ + ] Show comments
Answers (13)
Please log in to answer
Posted by:
MSIPackager
19 years ago
Posted by:
Thegunner
19 years ago
Posted by:
wiseapp
19 years ago
Posted by:
The_Repacker
19 years ago
Hi
If you want to use VBScript, past this code in custome action "Embeded VBScript" and the chage the source and distinatio. In below code Platform.ini is source and the second one is destination.
-------------------------------------------------------------------------
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "C:\Platform.ini", "C:\Test\"
----------------------------------------------------------------------------
Please let me know if this solves ur problem.
If you want to use VBScript, past this code in custome action "Embeded VBScript" and the chage the source and distinatio. In below code Platform.ini is source and the second one is destination.
-------------------------------------------------------------------------
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "C:\Platform.ini", "C:\Test\"
----------------------------------------------------------------------------
Please let me know if this solves ur problem.
Posted by:
Thegunner
19 years ago
ORIGINAL: The_Repacker
Hi
If you want to use VBScript, past this code in custome action "Embeded VBScript" and the chage the source and distinatio. In below code Platform.ini is source and the second one is destination.
-------------------------------------------------------------------------
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "C:\Platform.ini", "C:\Test\"
----------------------------------------------------------------------------
Please let me know if this solves ur problem.
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "C:\Platform.ini", "C:\Test\"
Will this replace a file that already exist?
What I want to do is to copy a file from a UNC path and overwrite it in C:\WINNT\SYSTEM32\DRIVERS
The file is fastfat.sys.
Posted by:
The_Repacker
19 years ago
Posted by:
revizor
19 years ago
ORIGINAL: Thegunner
Hi Rob,
In the past when I have put the file in the MSI it doesnt always seem to overwrite the file there.
Thats why I have been using xcopy.
What will the VBscript be to overwrite files?
Cheers
Damian
Thegunner,
you can edit the Files table & set the version # on the file - this should fix your "no overwrite" issue.
Posted by:
Thegunner
19 years ago
I have got it working from running the MSI manually, but once I put it in GPO and assign it to the PC. The Pc finds it starts to download it and I log on and the file hasnt been copied over. It still has the 2004 version instead of the 2003 version i want.
Strange, as I said it works if I run the MSI manually.
Strange, as I said it works if I run the MSI manually.
Posted by:
Thegunner
19 years ago
Posted by:
wiseapp
19 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.