- May
- 239
- 2
Scenario:
1. You have an alias that launches an external (Win32 GUI) program.
2. You want to use the alias in a batch file.
3. You don't want the batch file to wait for the alias (the external program) to complete.
How to best accomplish this?
The obvious solution is to use START, but this also causes a new TCC (session and console window) to be started.
You can specify /C so this is stopped as well when the external program is, but it's still not quite satisfactory.
Optionally /MIN and /INV can be used to make it look less ugly, but /MIN still starts a visible TCC window (taskbar)
and /INV may cause problems in cases where the alias is not alias at all, but in fact the name (in %path%) of the
external program. Both of them also causes an unnessary TCC instance to be running (hidden or not) as long as the external program is.
So I'll add:
4. The started command/alias may sometimes NOT be an alias, but starting it without waiting should still work the same way.
Anything other than START which could be useful?
Temporarily disabling waiting on external programs in batch files perhaps? That would make it work just like running the alias from the command line which I guess is a short summary of what I want.
Failing that, any "best practices" to share for such scenarios? I guess you could always test the supposed alias with IF ISALIAS and such to use different START parameters, but something simpler would be preferrable.
1. You have an alias that launches an external (Win32 GUI) program.
2. You want to use the alias in a batch file.
3. You don't want the batch file to wait for the alias (the external program) to complete.
How to best accomplish this?
The obvious solution is to use START, but this also causes a new TCC (session and console window) to be started.
You can specify /C so this is stopped as well when the external program is, but it's still not quite satisfactory.
Optionally /MIN and /INV can be used to make it look less ugly, but /MIN still starts a visible TCC window (taskbar)
and /INV may cause problems in cases where the alias is not alias at all, but in fact the name (in %path%) of the
external program. Both of them also causes an unnessary TCC instance to be running (hidden or not) as long as the external program is.
So I'll add:
4. The started command/alias may sometimes NOT be an alias, but starting it without waiting should still work the same way.
Anything other than START which could be useful?
Temporarily disabling waiting on external programs in batch files perhaps? That would make it work just like running the alias from the command line which I guess is a short summary of what I want.
Failing that, any "best practices" to share for such scenarios? I guess you could always test the supposed alias with IF ISALIAS and such to use different START parameters, but something simpler would be preferrable.