Page 1 of 1
Copy command does not work for me
Posted: Sat Nov 25, 2006 5:25 pm
by Edhy
Hi All,
Right before the end of the installation I had the Below right under the Compiler End:
The idea was to copy some files to one folder after it was installed already. The folder never was created and nothing was copied.
Create Folder $TARGETDIR\\Distribution
Copy local files $WINSYSDIR$\\Richtx32.OCX to $TARGETDIR\\Distribution\\Richtx32.OCX
Appreciate any feedback.
Regards,
Edhy
Posted: Sun Nov 26, 2006 8:15 am
by MichaelNesmith
Do these come after Apply Install? That would explain why they do not execute.
Copy local files
Posted: Sun Nov 26, 2006 12:39 pm
by Edhy
Hi,
I have this code after the following:
Apply Install
If Variable SUCCESS not Equals ERROR
Some Code...
Endif
[Compiler End]
Create Folder $TARGETDIR\\Distribution
Copy local files $WINSYSDIR$\\Richtx32.OCX to $TARGETDIR\\Distribution\\Richtx32.OCX
So I guess it should before the Apply Install Command.
Thanks,
Edhy
Posted: Sun Nov 26, 2006 4:21 pm
by MichaelNesmith
Exactly. OR, you can just directly execute those last two actions by Win32 API calls - through the Call DLL Function command.
Copy Local Files
Posted: Sun Nov 26, 2006 7:36 pm
by Edhy
Hi,
1)
Moving the code up above the Apply Install command worked partially.
This line copied the file as expected and that is from Windows\\System32:
Copy local files $WINSYSDIR$\\Richtx32.OCX to $TARGETDIR$\\Distribution\\Richtx32.OCX
But this line did not copy any file from the target folder. That file is found in the root of the installation folder. Any idea how to fix it?
Copy local files $TARGETDIR$\\eReports.dll to $TARGETDIR$\\Distribution\\eReports.dll
2)
When I Un Install I would like to remove all files that were created by the application later on or Copied as described above. I entered the following code right above the Apply Uninstall and it did no do it. Please advise.
Delete Files $TARGETDIR$ \\*.* (when uninstalling)
Regards,
Edhy
Posted: Sun Nov 26, 2006 9:02 pm
by MichaelNesmith
Please read the help topic titled "Setup Commands Preceding Apply Uninstall". This addresses your exact issue.
Copy command worked partially
Posted: Mon Nov 27, 2006 9:30 am
by Edhy
Hi Michael,
What about item 1 where it worked only partially? (The Copy command) and that is NOT an Un Install.
Regards,
Edhy
Posted: Mon Nov 27, 2006 10:04 am
by MichaelNesmith
You are trying to copy the local file before it gets put into place by the Install Files command - so that is why that didn't work.
Copy local file
Posted: Mon Nov 27, 2006 10:34 am
by Edhy
Hi Michael,
That's not really the case regarding the Copy Local Files.
I entered the Copy Local Files after all the Install Files command, as I said only the files from the System32 folder were successfully copied from some reason.
The Copy Local Files command are right above the Apply Install.
Is there something else that I am missing?
Thanks,
Edhy
Re: Copy local file
Posted: Mon Nov 27, 2006 1:26 pm
by MichaelNesmith
Edhy wrote:That's not really the case regarding the Copy Local Files.
Actually, it is. Please read this whitepaper to find out why:
www.installaware.com/msicode_scripting_technology.pdf