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

Execute Script/Batch File action not working properly in InstallAnywere 2011

hi,

I have an issue with Execute Script/Batch File. I have write a simple script to copy file from one location to another location in batch file and when i use this script directly it working properly but when I use this .bat through InstallyAnywhere Execute Script/Batch File action my .bat file does not execute.

I have writing a this statement to script text field to invoke dllcopy.bat file which is exists in installed folder

CMD /C RD /S /Q "$USER_INSTALL_DIR$$/$dllcopy.bat"

InstallAnywhere log show .bat file is successfully executed but actually .bat file not executed and file didn't copy so what was the mistake which is made my me.
Labels (1)
0 Kudos
(8) Replies
pv7721
Level 20

Doesn't the IA built-in copy action work?
0 Kudos
pv7721
Level 20

I've noticed your post in the other thread, where I was giving this example below. In case you didn't notice, by executing this command, you would delete the dllcopy.bat. Indeed, the example given invokes the Windows command interpreter, which runs the internal RD (Remove Directory) command, to which you give your .bat file as parameter.

Again, if what you want to do is to simply execute a .bat file, you've got two options: either install it and then use the Execute Target built-in command, or you could use the Execute Batch/Script action, and you could paste the .bat file content into that.

chmahmood wrote:
hi,

I have an issue with Execute Script/Batch File. I have write a simple script to copy file from one location to another location in batch file and when i use this script directly it working properly but when I use this .bat through InstallyAnywhere Execute Script/Batch File action my .bat file does not execute.

I have writing a this statement to script text field to invoke dllcopy.bat file which is exists in installed folder

CMD /C RD /S /Q "$USER_INSTALL_DIR$$/$dllcopy.bat"

InstallAnywhere log show .bat file is successfully executed but actually .bat file not executed and file didn't copy so what was the mistake which is made my me.
0 Kudos
chmahmood
Level 3

hi,

I have put the content of .bat file into script text field but it didn't work so kindly just simple give the syntex how to execute or run .bat file from IA. give the simple one line example..
0 Kudos
Macintosh
Level 5

Hello Mahmood,

I created a sample bat file which copy one file from source to destination. Then I executed the below command using both Execute Command and Execute Batch/Script Actions and it worked successfully.

CMD /C "$USER_INSTALL_DIR$$/$dllcopy.bat"

Or as Vlad said you can copy the entire batch script in Execute Batch/Script action and then execute it.

--Mac
0 Kudos
TomCarey
Level 4

I'm having the same problems. How can I debug what is happening??

Here is the bat file:
set NQ_MAINDIR_SILENT_MODE="$USER_INSTALL_DIR$"
set NQ_INSTALL_SKIP_STOPSERVICES=y
set NQ_INSTALL_SKIP_VCREDIST=n
set NQ_INSTALL_SKIP_DOTNET=y
set NQ_INSTALL_SKIP_OVERALLREGIIS=y
SSOInstaller.exe

--------------

the bat file lives in the setup directory along with the SSOInstaller.exe

I run execute command "CMD /C "$SETUP_DIR$$/$SSOInstall.bat"

I also tried execute script with the following:
cd $SETUP_DIR$
set NQ_MAINDIR_SILENT_MODE="$USER_INSTALL_DIR$"
set NQ_INSTALL_SKIP_STOPSERVICES=y
set NQ_INSTALL_SKIP_VCREDIST=n
set NQ_INSTALL_SKIP_DOTNET=y
set NQ_INSTALL_SKIP_OVERALLREGIIS=y
SSOInstaller.exe

--------------

I also tried without the cd $SETUP_DIR$

Any help on how to debug would be appreciated.
0 Kudos
Macintosh
Level 5

Hello Tom,

Are you trying to run/launch the installer from the bat file and passing these values to the installer? If that is the case then I believe that you can run/launch the installer from bat file but to pass the arguments in the installer, you need to use the -D option as per below article:

http://kb.flexerasoftware.com/doc/Helpnet/IA2011/Content/helplibrary/ia_using_command_line_arguments.htm


Are you running/launching the installer from another installer using bat file? Please elaborate the requirement.

-- Mac
0 Kudos
TomCarey
Level 4

thanks for the quick response.
Yes, the SSOInstaller is an old wise install executable, I don't
believe it supports the -D option like IA does.

I am running the .bat file from another IA 2011 install exe.

While this is part of the question, what I really like to know is is there
is anyway to turn on, or build a debug version of the install that will
generate more debug information.

thanks again
0 Kudos