Copy OR Move Commands

Got a problem you cannot solve? Try here.
SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Copy OR Move Commands

Postby SITL » Tue Oct 04, 2016 3:59 am

Hi

I Couldn't figure out what is wrong with my script.

After Apply Install, I have a Copy Command which is not working.
I have a text file in the Target Directory ( where my files are installed ),
which i am trying to copy to another directory.

Find below the two lines of my script.

~InstallAware Clipboard Data~
~Apply Changes~
~{25833FF8-2B73-414B-AEE2-DE3532A65C5D}~
~progress~
~SUCCESS~
~TRUE~
~FALSE~

~Copy/Move Local Files~
~{C7E6D95B-65F1-4CB4-B824-2C7B6C6CF4AD}~
~$TARGETDIR$~
~tips.txt~
~F:\InstDev~
~tips.txt~
~TRUE~
~FALSE|FALSE~

Apprecite your help.
Regards
SITL

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Copy OR Move Commands

Postby bokkie » Tue Oct 04, 2016 9:52 am

SITL,

The copy/move command is in the (by default) purple command list and they get stacked/sequenced for execution but only get executed when Apply Install executes. Placing it after the Apply Install could explain why it isn't "working". Try placing it before the Apply Install command. Does that help?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: Copy OR Move Commands

Postby SITL » Wed Oct 05, 2016 12:48 am

Dear bokkie,

Appreciate your reply.
At the beginning of the installation, depending on license type i need to copy some files and rename.
Since that didn't work, i placed copy command after the Apply install.
I read about purple commands here in this forum. i put maximum effort to make it work before posting here,
My machine is Windows 7 with Admin rights.
Do you see any other problem in the below copy/move commands

~Copy/Move Local Files~
~{C7E6D95B-65F1-4CB4-B824-2C7B6C6CF4AD}~
~$TARGETDIR$~
~tips.txt~
~F:\InstDev~
~tips.txt~
~TRUE~
~FALSE|FALSE~

Thanks for the help
Regards
SITL

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Copy OR Move Commands

Postby bokkie » Wed Oct 05, 2016 3:57 am

I'll try and test your code later. To recap, then, you want to copy files at the beginning knowing you've done what you want to do prior to running the Apply Install. In that case, have you considered or tried using the native engine setting in the script? Enable it before you do the copy and disable it after. In case you might not have come across it before, the following link explains more about it:

http://www.installaware.com/FlashHelp/nativeengine.htm

Could you try it and see if resolves things for you?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: Copy OR Move Commands

Postby SITL » Fri Oct 07, 2016 5:24 am

Dear Bokkie,

Thanks for the reply,

I have my file packaged along with the installable's, which i want to copy/rename depending on license type.
So which Predefined variable i should use, SUPPORTDIR OR TARGETDIR ?
Which is the variable that refers to the directory which contains all the files to be installed ?

I have properly initialized SourcePath and DestPath and
After setting NATIVE_ENGINE to TRUE,
This one works :
~InstallAware Clipboard Data~
~Copy/Move Local Files~
~{B6AB4215-A7AF-49A1-BA87-15DA476070E8}~
~$SourcePath$~
~tips.txt~
~$DestPath$~
~tips.txt~
~TRUE~
~FALSE|FALSE~

This one doesn't work:
~InstallAware Clipboard Data~
~Copy/Move Local Files~
~{E5C68143-6AA4-4CA5-831F-3C880D8C11FF}~
~$SUPPORTDIR$~
~tips.txt~
~$DestPaht$~
~tips.txt~
~TRUE~
~FALSE|FALSE~

And this one also doesn't work:
~InstallAware Clipboard Data~
~Copy/Move Local Files~
~{A178FA43-9575-43CE-9A12-95C3F16CAC0C}~
~$TARGETDIR$~
~tips.txt~
~$DestPath$~
~tipsRenamed.txt~
~TRUE~
~FALSE|FALSE~

Appreciate your reply.
Regards
SITL

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Copy OR Move Commands

Postby FrancescoT » Fri Oct 07, 2016 5:44 am

Dear STL,

1 - Did you add your file into your project SUPPORTDIR?
http://www.installaware.com/forums/viewtopic.php?f=2&t=10676&hilit=SUPPORTDIR#p40674

2- Are you sure that you are copying/moving TARGETDIR files after APPLY INSTALL execution?
By default with an MSI based setup, Target files are only available once these are effectively installed!

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: Copy OR Move Commands

Postby SITL » Wed Oct 12, 2016 5:35 am

Dear Francesco Toscano,
Great help, things are progressing :D.
SUPPORTDIR related issue works, thanks.
However, One problem remains,
i.e., During installation we ask user to select the license file, that file we want to copy to TARGETDIR.
So here is the script, that is not working.
NOTE : Selection of license file is using Open File Dialog, And variables LicenseFilePath & LicenseFileName are properly initiated.
I'm watching these two variables.

~InstallAware Clipboard Data~
~Set Variable~
~{F4B9D630-CA1C-44A4-9036-06D686BBE413}~
~NATIVE_ENGINE$MYAH$MYAH$FALSE~
~TRUE~

~InstallAware Clipboard Data~
~Copy/Move Local Files~
~{8852C1C1-8AED-411C-8DBC-A68190194277}~
~$LiccenseFilePath$~
~$LicenseFileName$~
~$TARGETDIR$~
~$LicenseFileName$~
~TRUE~
~FALSE|FALSE~

~InstallAware Clipboard Data~
~Set Variable~
~{AFE947B0-44D1-4FF8-8D81-09946477C791}~
~NATIVE_ENGINE$MYAH$MYAH$FALSE~
~FALSE~

With your help, thins are progressing, Appreciate,
Have a great day !
Regards
SITL

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Copy OR Move Commands

Postby FrancescoT » Wed Oct 12, 2016 11:49 am

Dear SITL,

you should post at least a minimal project or alternatively you should describe in details, how those commands are exactly sequenced in your script.

I am very sorry, but just looking at your commands I am not able to understand when these get called and/or if the commands parameters are correct.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: Copy OR Move Commands

Postby SITL » Thu Oct 13, 2016 5:59 am

Dear Francesco Toscano,

Sorry for inconvenience.
I have created a sample project and simplified to some extent.

Testing steps:
Once you extract files, I have a "Source" folder inside TestApp.
Source folder contains files to be installed and a file(TestV2C.v2c.) to be copied and renamed.
Please bear with me for few extra screens.
Click Next, Next until you hit License type screen (sorry, i could not simplify much, I'm still new to IA :) )
In License type screen, Select License File i.e., TestV2C.v2c, Once you select, it move to next screen and complete the installation.

Installation is fine, but the TestV2C.v2c file is not copied to TARGETDIR.

Thanks for your help And I appreciate you response.

Regards
SITL
Attachments
TestApp.rar
(3.68 MiB) Downloaded 675 times

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Copy OR Move Commands

Postby FrancescoT » Thu Oct 13, 2016 10:38 am

Dear SITL,

of course your TestV2C.v2c file doesn't get stored under TARGETDIR.
You missed to consider that TARGETDIR will only exist on the target machine after APPLY INSTALL execution.

So to solve your problem, just move your COPY/MOVE file operation immediately after the APPLY INSTALL statement in your main script.

For example;

Code: Select all

    Apply Install (get result into variable SUCCESS)
     ......
    if Variable SUCCESS Equals COMPLETE
      Set Variable NATIVE_ENGINE to TRUE
      Copy Local Files $LiccenseFilePath$\$LicenseFileName$ to $TARGETDIR$\$LicenseFileName$
      Set Variable NATIVE_ENGINE to FALSE
    end
     ......

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: Copy OR Move Commands

Postby SITL » Fri Oct 14, 2016 1:09 am

Dear Francesco Toscano,

Thanks for your reply.
First I tried placing after Apply Install, It didn't work, then this is what Bokkie told me to do . . .
Bokkie -
The copy/move command is in the (by default) purple command list and they get stacked/sequenced for execution but only get executed when Apply Install executes. Placing it after the Apply Install could explain why it isn't "working". Try placing it before the Apply Install command.


Actually, I tried both the ways.
Have a great day !

Regards
SITL.

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Copy OR Move Commands

Postby bokkie » Fri Oct 14, 2016 3:54 am

SITL,

I, like Francesco, am also puzzled with your problem. I have never had a problem using Copy/Move. Can I ask you to try something? Can you put some message boxes in your code and display the value of all the variables you reference in your Copy/Move statement and tell us what the directory and filenames are?

Referring to Francesco's code snippet can you also display the value of the Apply Install's SUCCESS variable as well? We need to make sure the "if" statement is being executed and not running around it.

I'm just thinking aloud here but are you certain there are no access restrictions with the files you want to copy?

I don't know if we've discussed this but when your installation completes can you open a DOS command prompt and see if you can manually copy the file?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

SITL
Posts: 116
Joined: Tue Sep 27, 2016 12:31 am

Re: Copy OR Move Commands

Postby SITL » Fri Oct 14, 2016 6:11 am

Dear Bokkie,

Appreciate your quick response.
You spotted the problem, It was access denied.
It's working fine now.

Thank you, Bokkie and Francesco T :D
Regards
SITL

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Copy OR Move Commands

Postby bokkie » Fri Oct 14, 2016 8:39 am

Delighted to read it's working okay for you now. :D
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Copy OR Move Commands

Postby FrancescoT » Fri Oct 14, 2016 11:14 am

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 39 guests