Create Batch file for iexpress
c#, exe, iexpress, installation, silent
Solution
The problem is that, as you can see from your screenshot, the batch file is being executed by `command.com`, not `cmd.exe`. (If you don't specify an interpreter, IExpress uses `command.com`. Ouch.) So there are no variables like `%cd%` or `%~dp0`.
You likely don't need them anyhow. But you do need to execute your batch file explicitly in IExpress like:
cmd.exe /c file.bat
so that it uses a modern command interpreter.
The second bit of code in your question makes the files persistent (ie they won't be deleted after the IExpress archive terminates) by `xcopy`ing them to a different directory.
Problem
I am trying to use `iexpress` to run my batch file which will execute the 2 exe & 1 msi files for me. when i try to do it manually, it works. following is the code in my batch file. ``` Start /wait %CD%\1.exe /q Start /wait %CD%\2.exe /q msiexec.exe /i "%CD%\3.msi" ``` but this doesn't seem to be working when i create an exe file from iexpress. Reference Above mentioned article has some code(to copy files to temp folder) & but i am not able to understand the syntax. ``` MKDIR %Tmp%\<UNIQUE PRODUCT NAME> XCOPY . %Tmp%\<UNIQUE PRODUCT NAME> /S /E /Y %Tmp%\<UNIQUE PRODUCT NAME>\setup.exe ```