cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
krishnanrp
Level 3

Command with wild card character "*" is not working

Hi

Let me give the background for this question. We have an installer built using InstallAnywhere 2008, which acts as a fresh installer as well as a refresh installer. Think of a fresh install being the product built a few months back and installed on a machine for the first time and the refresh install being the product built today, with patches to problems found in the fresh install and installed over an existing installation.

1) On AIX, In the install step of the refresh install, InstallAnywhere extracts the jre into a folder named $USER_INSTALL_DIR$/ia_jre_extraction_dir_xxxx.tmp folder, where xxxx is some random number.
This folder is not cleaned up by InstallAnywhere at the completion of the installation (only on AIX). Even if we uninstall the product this folder is left over.
So for any number of refresh installs, we would see a new ia_jre_extraction_dir_xxxx.tmp folder left out. where xxxx varies per installation
Why is this left out and whether this is a known issue that InstallAnywhere plans to handle in future?

2) I tried adding an action to the installAnywhere package file to delete these folders using a wild card character * like
rm -rf "$USER_INSTALL_DIR$$/$ia_jre_extraction_dir*" (on AIX)

or

cmd.exe /c rmdir /s /q "$USER_INSTALL_DIR$$/$ia_jre_extraction_dir*" (on Windows, I am trying to simulate this by manually creating this dir and trying to execute the rmdir command from the installer)

But it seem to fail and the temp folder is not removed. The return code is -1 whereas the log indicates a SUCCESS for the execution of this command.

I tried various combinations like
cmd.exe /c rmdir "$USER_INSTALL_DIR$$/$ia_jre_extraction_dir$*$" /s /q
cmd.exe /c rmdir "$USER_INSTALL_DIR$$/$ia_jre_extraction_dir\*" /s /q
rmdir /s /q "$USER_INSTALL_DIR$$/$ia_jre_extraction_dir\*"

Can you help me to resolve this issue, by removing this temp folder by InstallAnywhere itself or temporarily suggest ways to correct the command syntax to delete this folder.

The reason I want to delete this folder is because,
1) it results in unnecessary accumulation of lot of such temp folders on many such refresh installs
2) A fresh install after an uninstallation throws an error that there is some folders left in the install path. I do not want to add the temp jre folders to be excluded, when I check for a valid install path

Awaiting an early response.
Thanks.
R P Krishnan
Labels (1)
0 Kudos

(5) Replies
pv7721
Level 20

Your issue happens on AIX only, right? I was wondering why didn't you try the same approach as on Windows, which is to Execute the following command:
sh -c "rm -rf $USER_INSTALL_DIR$$/$ia_jre_extraction_dir*"
0 Kudos
nosrednayduj
Level 7

Your problem will happen on Solaris too. At least, it happened to me there. Linux and Windows don't have the ia_jre_extraction_dir.
0 Kudos
krishnanrp
Level 3

Hi
I have tried on Windows as well. In my post, the commands
cmd.exe /c rmdir "$USER_INSTALL_DIR$$/$ia_jre_extraction_dir\*" /s /q

is a command tried on windows.

With Regards
R P Krishnan
0 Kudos
Bahman
Level 2

instead of:
rm -rf "$USER_INSTALL_DIR$$/$ia_jre_extraction_dir*"

try (Execute Script/Batch):
cd "$USER_INSTALL_DIR$"
rm -rf ia_jre_extraction_dir*
0 Kudos
krishnanrp
Level 3

Thanks. Adding the command as a batch script helped in removing this folder.

Ideally, it should have been cleaned up by InstallAnywhere. But we could use this approach to clean it up, until InstallAnywhere finds the cause and a solution.

With Regards
R P Krishnan
0 Kudos