I am new to Installaware and am converting Wise scripts.
There is one, rather complicated, converted installation that I have working in NON native mode (Windows mode).
As I learn Installaware better I think I have a problem that I need help with.
Without going into details I have a number of files that need to ALWAYS overwrite the files on the target machine. They are data files so it is a date comparison issue. The date of the file on the target will be later than the one I am installing.
I tried deleting the old files and then copying but that did not seem to work.
I understand that NATIVE mode will allow me to force an overwrite but when I change this install to Native mode... other odd problems start popping up with files not being registered, strange MS Engine errors and a missing file or two.
Rather than trying to start debugging something that is 99.9% working in NON-Native mode I would rather figure out how to force an overwrite of an existing file or two.
Do you have any suggestions?
Thanks,
George
Install File question
Re: Install File question
George,
Unless I'm misunderstanding your question let me sort of explain a little about native and non-native mode. You don't need to change your script to use exclusively native mode. You can let your script run perfectly non-natively and when you require to do something that requires native mode, enable the native mode at that point in your script and then disable native mode when you've completed what you need to do. All other, so-called "purple" commands will then revert to deferred execution until such time when the Apply Install command is reached. At that time all "stacked" purple commands will then be executed. In other words you can turn native mode on and off at any time.
The only problem that caught me on one occasion is where I was running some script in non-native mode and the expected order was "do A", "do B" and then "do C". I switched "do C" to native mode. I overlooked "do B" which created a resource that "do C" expected to find. "do C" failed to do what I wanted because in native mode, it occurred before "do B" which like "do A" was deferred to Apply Install. That took me a while to work out.
Perhaps your sequence of events is doing something similar?
Unless I'm misunderstanding your question let me sort of explain a little about native and non-native mode. You don't need to change your script to use exclusively native mode. You can let your script run perfectly non-natively and when you require to do something that requires native mode, enable the native mode at that point in your script and then disable native mode when you've completed what you need to do. All other, so-called "purple" commands will then revert to deferred execution until such time when the Apply Install command is reached. At that time all "stacked" purple commands will then be executed. In other words you can turn native mode on and off at any time.
The only problem that caught me on one occasion is where I was running some script in non-native mode and the expected order was "do A", "do B" and then "do C". I switched "do C" to native mode. I overlooked "do B" which created a resource that "do C" expected to find. "do C" failed to do what I wanted because in native mode, it occurred before "do B" which like "do A" was deferred to Apply Install. That took me a while to work out.

Perhaps your sequence of events is doing something similar?
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP
InstallAware MVP
-
- Posts: 63
- Joined: Sun Jul 13, 2014 3:28 pm
Re: Install File question
HI,
When I just changed the entire script to Native mode... problems arose as I mentioned with registration of an ocx, creation of a file which was supposed to occur within the script.. and the most odd was a MS Jet engine error on a particular database. I could not see why changing the mode for the entire script would cause these problems.. especially the last one. None of these errors occurred when running in NON-Native mode.
You mention that you can change modes within a single script. So... perhaps if I do most of my work in Native and then near the end of the script... after the apply install command... then install the files I want to overwrite ... first setting the appropriate overwrite variables. Does that sound feasible?
If so, would I then need another apply install before ending the script... or does a "apply install" not makes sense once in Native mode?
Thanks,
George
When I just changed the entire script to Native mode... problems arose as I mentioned with registration of an ocx, creation of a file which was supposed to occur within the script.. and the most odd was a MS Jet engine error on a particular database. I could not see why changing the mode for the entire script would cause these problems.. especially the last one. None of these errors occurred when running in NON-Native mode.
You mention that you can change modes within a single script. So... perhaps if I do most of my work in Native and then near the end of the script... after the apply install command... then install the files I want to overwrite ... first setting the appropriate overwrite variables. Does that sound feasible?
If so, would I then need another apply install before ending the script... or does a "apply install" not makes sense once in Native mode?
Thanks,
George
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Install File question
Dear George,
Bokkie was referring to the possibility to turn ON/OFF the NATIVE ENGINE mode at any time in the setup sequence, with a setup based on MSI engine. This makes possible to overcome some MSI engine restrictions/limitations.
For example suppose the case that for some "reasons", you need to create a folder on the target OS and this has to be available before the setup sequence gets completed. With a standard MSI based setup this will be not possible. Due the fact that the "Create Folder" command, which is a WINDOWS INSTALLER COMMAND (PURPLE COMMAND), it doesn't get executed immediately. The effective folder creation it's instead deferred to APPLY INSTALL execution. In other words, such folder will be available on the target machine only once the setup process will be completed.
With the help of the IA NATIVE ENGINE, instead this becomes possible. You can TURN ON the NATIVE ENGINE mode at any time you need to create such folder and then to return back to MSI engine mode once done.
Set Variable NATIVE_ENGINE to TRUE
Create Folder c:\xxxx
Set Variable NATIVE_ENGINE to FALSE
The above approach will also have the effect, that the above folder creation will be not part of the MSI database and consequently, the folder will be not involved in any MSI process...as when Uninstalling the package or at setup maintenance mode, unless these circumstances are expressly handled.
Finally to complete the example, the above folder once created will be not "automatically" removed, but it will be necessary to delete it (via script code) in case you don't want to leave the folder with target machine.
Hope this clarifies your doubt.
Regards
Bokkie was referring to the possibility to turn ON/OFF the NATIVE ENGINE mode at any time in the setup sequence, with a setup based on MSI engine. This makes possible to overcome some MSI engine restrictions/limitations.
For example suppose the case that for some "reasons", you need to create a folder on the target OS and this has to be available before the setup sequence gets completed. With a standard MSI based setup this will be not possible. Due the fact that the "Create Folder" command, which is a WINDOWS INSTALLER COMMAND (PURPLE COMMAND), it doesn't get executed immediately. The effective folder creation it's instead deferred to APPLY INSTALL execution. In other words, such folder will be available on the target machine only once the setup process will be completed.
With the help of the IA NATIVE ENGINE, instead this becomes possible. You can TURN ON the NATIVE ENGINE mode at any time you need to create such folder and then to return back to MSI engine mode once done.
Set Variable NATIVE_ENGINE to TRUE
Create Folder c:\xxxx
Set Variable NATIVE_ENGINE to FALSE
The above approach will also have the effect, that the above folder creation will be not part of the MSI database and consequently, the folder will be not involved in any MSI process...as when Uninstalling the package or at setup maintenance mode, unless these circumstances are expressly handled.
Finally to complete the example, the above folder once created will be not "automatically" removed, but it will be necessary to delete it (via script code) in case you don't want to leave the folder with target machine.
Hope this clarifies your doubt.
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
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
-
- Posts: 63
- Joined: Sun Jul 13, 2014 3:28 pm
Re: Install File question
Thanks..
Now I have a different issue but somewhat related.
I have to replace a folder, which has sub-folders, with a new set of data during a certain type of install.
So as an example. I have a folder called SLOSH which has 40 sub folders... for example
/SLOSH/ATL1
/SLOSH/BOS2
/SLOSH/CHI3
.
.
How can I remove all of these subfolders as well as the SLOSH folder?
I notice a delete files with *.* does not remove the subfolders. Is there any single command that can get rid of the entire SLOSH folder?
I am assuming native mode here.
Thanks,
George
Now I have a different issue but somewhat related.
I have to replace a folder, which has sub-folders, with a new set of data during a certain type of install.
So as an example. I have a folder called SLOSH which has 40 sub folders... for example
/SLOSH/ATL1
/SLOSH/BOS2
/SLOSH/CHI3
.
.
How can I remove all of these subfolders as well as the SLOSH folder?
I notice a delete files with *.* does not remove the subfolders. Is there any single command that can get rid of the entire SLOSH folder?
I am assuming native mode here.
Thanks,
George
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Install File question
Dear George,
please try to use "Delete Files Recursive". This is not a Windows Installer Command ... so it's gets executed immediately.
Regards
please try to use "Delete Files Recursive". This is not a Windows Installer Command ... so it's gets executed immediately.
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
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
Who is online
Users browsing this forum: Google [Bot] and 92 guests