I have a client who needs to run a program on a Windows 2008 R2 terminal server in RemoteApp. RemoteApp allows for command line arguments when launching published apps but it's not working so I'm resorting to a batch file.
The shortcut on the desktop of this server actually runs and launches the program exactly as it should. This is what I am trying to emmulate in a batch file.
Windows Shortcut info:
Target: "C:\Program Files (x86)\ASI\iMIS15\Omnis7\Omnis7.exe" imis4.lbr /m
Start In: "C:\Program Files (x86)\ASI\iMIS15\"
Shortcut Key: None
Run: Normal Window
Comment: iMIS Desktop
If someone could assist with creating the script, that would be great. Below is what I have started with but I don't think I'm on the right track as I'm not a programmer and don't understand the swtiches and variables enough to make this work.
What we are trying to accomplish it to have it automatically run/load the imis4.lbr file located in the arg1 part of the script below.
===
::My batch file attempt
set arg1=%~p1 "C:\Program Files (x86)\ASI\iMIS15\imis4.lbr /m"
START "NCPA Prod iMIS Database" /max "C:\Program Files (x86)\ASI\iMIS15\Omnis7\Omnis7.exe" %arg1%
Need assistance creating batch file with arguments
Moderator: DosItHelp
Re: Need assistance creating batch file with arguments
'
start "!File!" /low %PreFetch% "%comspec%" !CMDLeaveRunning! " "!FullPathFile!" !Parameters! "
start "!File!" /low %PreFetch% /D "!FullPath!" "%comspec%" !CMDLeaveRunning! " "!File!" !Parameters! "
start "!File!" /low %PreFetch% "!FullPathFile!" !Parameters!
try:
or
start "!File!" /low %PreFetch% "%comspec%" !CMDLeaveRunning! " "!FullPathFile!" !Parameters! "
start "!File!" /low %PreFetch% /D "!FullPath!" "%comspec%" !CMDLeaveRunning! " "!File!" !Parameters! "
start "!File!" /low %PreFetch% "!FullPathFile!" !Parameters!
try:
Code: Select all
start "NCPA Prod iMIS Database" /max "C:\Program Files (x86)\ASI\iMIS15\Omnis7\Omnis7.exe" "C:\Program Files (x86)\ASI\iMIS15\imis4.lbr" /m"
Code: Select all
start "NCPA Prod iMIS Database" /max /D "C:\Program Files (x86)\ASI\iMIS15\Omnis7" "%comspec%" /c " "Omnis7.exe" "C:\Program Files (x86)\ASI\iMIS15\imis4.lbr" /m"