This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- script/batch action is not working
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 21, 2008
11:48 AM
Execute Command, Execute Script/Batch file actions not executing
I am having problems with the Execute Command and Execute Script/Batch file actions. Neither appear to execute during the installation even when I try a simple function like making a directory. I am using IA 2008 Enterprise and installing on Windows Vista (user account control turned off).
For example, say I want to make a directory called aghornTemp in the installed directory. With Execute Command I put in:
mkdir aghornTemp
With Execute Script/Batch file, I've tried
mkdir aghornTemp
and also created a batch file with the above being the only command. And also doing the following like someone earlier in this forum suggested:
call "$USER_INSTALL_DIR$$/$make_aghornTemp.bat
Nothing works. My developer partner is experiencing the same problems, and she is installing on Windows XP.
Are we missing something here? I thought that these IA actions would be pretty straightforward.
For example, say I want to make a directory called aghornTemp in the installed directory. With Execute Command I put in:
mkdir aghornTemp
With Execute Script/Batch file, I've tried
mkdir aghornTemp
and also created a batch file with the above being the only command. And also doing the following like someone earlier in this forum suggested:
call "$USER_INSTALL_DIR$$/$make_aghornTemp.bat
Nothing works. My developer partner is experiencing the same problems, and she is installing on Windows XP.
Are we missing something here? I thought that these IA actions would be pretty straightforward.
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 21, 2008
12:51 PM
There's a trick here. If you're executing "internal" commands, you need to actually Execute the commander interpreter, and not directly the command itself, for instance:
So you execute the cmd with the command execution setting, and the command is the Windows rm -rf equivalent...
The trick is also in quoting (in case, and it's often the case on Windows, your installation dire contains spaces you need to quote them, but just around the dir, not the whole command...
CMD /C RD /S /Q "$USER_INSTALL_DIR$$/$tmp$/$"
So you execute the cmd with the command execution setting, and the command is the Windows rm -rf equivalent...
The trick is also in quoting (in case, and it's often the case on Windows, your installation dire contains spaces you need to quote them, but just around the dir, not the whole command...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 21, 2008
03:13 PM
pv7721 is correct. When you run or launch a batch file from LaunchAppAndWait, the process you are opening is not running in a dos shell. So the interpretation layer isn't running. When you run your batch file under CMD, it loads that interpretation and your batch file will be able to run.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 21, 2008
04:17 PM
Thanks very much for the help. Was never much of a DOS/CMD batch file writer either. So this helps. Was able to do my simple make directory command. Working on a more involved batch file which isn't working yet but investigating at the moment.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 16, 2011
07:02 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.
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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 16, 2011
09:45 AM
I've answered to the new thread you've created here: http://community.flexerasoftware.com/showthread.php?t=199743
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 17, 2012
09:11 AM
im following below systax in script/batch action but it is not working
cmd.exe /c @echo off
cmd.exe /c ping 127.0.0.1 -n 10 > nul
cmd.exe /c shutdown /r /t 0 /d P:4:2
can some pls help me
cmd.exe /c @echo off
cmd.exe /c ping 127.0.0.1 -n 10 > nul
cmd.exe /c shutdown /r /t 0 /d P:4:2
can some pls help me