PDA

View Full Version : Execute Script/Batch File action not working properly in InstallAnywere 2011



chmahmood
11-16-2011, 08:24 AM
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.

pv7721
11-16-2011, 10:33 AM
Doesn't the IA built-in copy action work?

pv7721
11-16-2011, 10:39 AM
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.


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.

chmahmood
11-16-2011, 12:10 PM
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..

Macintosh
11-17-2011, 10:14 AM
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

TomCarey
12-11-2011, 06:53 PM
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.

Macintosh
12-12-2011, 04:02 AM
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

TomCarey
12-12-2011, 08:03 AM
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

Macintosh
12-12-2011, 08:56 AM
Refer the below links, it might be useful for you.

http://kb.flexerasoftware.com/doc/Helpnet/IA2011/Content/helplibrary/ia_ts_directing_debug_output.htm#advanced_solutions_3164012938_1125217


http://kb.flexerasoftware.com/doc/Helpnet/IA2011/Content/helplibrary/ia_ts_using_output_debug_info.htm#advanced_solutions_3164012938_1068959

-- Mac