>RUN "&InstallBatchFilename" "&scFilename" "&instsrvFilename" "&srvanyFilename" >>
> LOCAL ; > m.CurrentSafetySetting, ; > m.InstallBatchCommands > > m.CurrentSafetySetting = SET('SAFETY') > > SET SAFETY OFF > > m.InstallBatchCommands = '' > >*!* m.InstallBatchCommands = m.InstallBatchCommands + 'echo "%~f1" "%~f2" "%~f3"' + CHR(13) + CHR(10) >*!* m.InstallBatchCommands = m.InstallBatchCommands + 'pause' + CHR(13) + CHR(10) >*!* m.InstallBatchCommands = m.InstallBatchCommands + '"%~f1" delete "EMPS"' + CHR(13) + CHR(10) >*!* m.InstallBatchCommands = m.InstallBatchCommands + '"%~f2" EMPS "%~f3"' + CHR(13) + CHR(10) > > m.InstallBatchCommands = m.InstallBatchCommands + 'echo %1 %2' + CHR(13) + CHR(10) > m.InstallBatchCommands = m.InstallBatchCommands + 'pause' + CHR(13) + CHR(10) > m.InstallBatchCommands = m.InstallBatchCommands + '%1 EMPS %2' + CHR(13) + CHR(10) > > m.InstallBatchFilename = SYS(2023)+'\EMPS_Install.bat' > STRTOFILE(m.InstallBatchCommands,m.InstallBatchFilename) > >* m.scFilename = SYS(2023)+[\sc.EXE] >* STRTOFILE(FILETOSTR([sc.EXE]),m.scFilename) > > m.instsrvFilename = SYS(2023)+[\instsrv.EXE] > STRTOFILE(FILETOSTR([instsrv.EXE]),m.instsrvFilename) > > m.srvanyFilename = SYS(2023)+[\srvany.EXE] > STRTOFILE(FILETOSTR([srvany.EXE]),m.srvanyFilename) > >* RUN /N sc.exe create "EMPS" binPath= "c:\FMSRun\EMPS.exe" >* RUN EMPS_Install.bat "&scFilename" "&instsrvFilename" "&srvanyFilename" > RUN EMPS_Install.bat "&instsrvFilename" "&srvanyFilename" >Why do you need to send parameters to a batch file you just created? Can't you just insert the values as such?
text to InstallBatchCommands textmerge noshow "<<m.scFilename>>" EMPS "<<m.srvAnyFileName>>" endtextAnd that's your batch file. You may want to put fullpaths into your variables, because sys(2023) may return a 8.3 shorthand path - which may still work fine in a .bat file, but may be a bit unclear when read by a human.