>* Do NOT indent (or use Beautify on) these TEXT/ENDTEXT blocks as it will mess up the results >TEXT to m.RegCommands TEXTMERGE NOSHOW >REGEDIT4 ><<m.InstallHKey>> >"AppDirectory"="<<m.InstallAppDirectory>>" >"Application"="<<m.InstallApplication>>" >"HostName"="<<m.DefaultHostName>>" >"Port"="<<m.DefaultPort>>" >"BackupDirectory"="<<m.DefaultBackupDirectory>>" >"DataDirectory"="<<m.DefaultDataDirectory>>" >"PromptDirectory"="<<m.DefaultPromptDirectory>>" >"Switch"="<<m.DefaultSwitch>>" >ENDTEXT > > * Create the REG file > m.RegFilename = '"' + JUSTPATH(application.servername) + [\EMPS.REG] + '"' > STRTOFILE(m.RegCommands,m.RegFilename) > > * Initialize the variable that will hold the BAT file commands > m.InstallBatchCommands = '' > >* Do NOT indent (or use Beautify on) these TEXT/ENDTEXT blocks as it will mess up the results >TEXT to m.InstallBatchCommands TEXTMERGE NOSHOW >NET STOP EMPS >SC delete "EMPS" ><<m.instsrvFilename>> "EMPS" <<m.srvanyFilename>> >REGEDIT.EXE /S <<m.RegFilename>> >ENDTEXT > > * Create the BAT file > m.InstallBatchFilename = '"' + JUSTPATH(application.servername) + '\EMPS_Install.bat' + '"' > STRTOFILE(m.InstallBatchCommands,m.InstallBatchFilename) > > * Run the BAT file > RUN /N &InstallBatchFilename > > * Give the batch file time to run > m.TimePause = DATETIME() + 3 > DO WHILE DATETIME() < m.TimePause && Wait 3 seconds... > ENDDO >Just a SWAG - could you try name resolution instead of macro substitution?
RUN /N ( m.InstallBatchFilename )