dr_heathcliff
(Lurker)
2005-11-11 01:21 PM
shell/run enhancements

Suggestion - add an additional parameter to shell and run to control the window size the called program runs in (e.g. normal/minimized/maximised/hidden).

shell("notepad.exe", 0) for normal (default)
shell("notepad.exe", 1) for maximised
shell("notepad.exe", 2) for minimised
shell("notepad.exe", 3) for hidden

The one I am most interested in is hidden - it would be great to call a Windows Application hidden (like you can with SMS Installer 2.0.148.0) so the user doesn't see it launch.


Les
(KiX Master)
2005-11-11 02:17 PM
Re: shell/run enhancements

but SHELL is a command, not a function. This would break all backward compatibility.

ShawnAdministrator
(KiX Supporter)
2005-11-11 03:05 PM
Re: shell/run enhancements

He meant to say "add a switch", right Paul ? maybe like:

SHELL "<command>" /HIDDEN


Les
(KiX Master)
2005-11-11 03:13 PM
Re: shell/run enhancements

There are some options that may be leveraged with COM using CreateObject("Shell.Application").

Sealeopard
(KiX Master)
2005-11-12 03:24 AM
Re: shell/run enhancements

And via
Code:

SHELL '%COMSPEC% /C START ...'



LonkeroAdministrator
(KiX Master Guru)
2005-11-13 03:05 AM
Re: shell/run enhancements

and there is the udf runEx() for doing what you wanted...

dr_heathcliff
(Lurker)
2005-11-22 03:36 PM
Re: shell/run enhancements

Les, you are right, (silly me) it's a command not a function and as such a switch would have to be used.

sealeopard, SHELL '%COMSPEC% /c START...' doesn't allow me to launch a process hidden.

Jooel, I was aware of the runEx() udf (and shell.application.shellexecute method) but as far as I am aware it will only launch the process and continue - e.g. equiv to the kiXtart "RUN" command - it doesn't emulate the functionality of the kiXtart "SHELL" command. If anyone knows of a way to use a command to emulate this behavour (shell process hidden), it would be gracefully received!!

I'm quite happy if the consensus that this isn't really a positive enhancement means this doesn't happen, but I personally would find it useful, hence why I suggested it ;-)


LonkeroAdministrator
(KiX Master Guru)
2005-11-22 07:28 PM
Re: shell/run enhancements

making shell/run a function is something I do can vote for

anyway, from run to shell it's nothing more than some looping and sleeping.


Richard H.Administrator
(KiX Supporter)
2005-11-23 09:28 AM
Re: shell/run enhancements

Quote:

anyway, from run to shell it's nothing more than some looping and sleeping.




...or use Wscript.Shell.Run with the "wait" flag as mentioned here: http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=151537&an=0&page=0#151537


LonkeroAdministrator
(KiX Master Guru)
2005-11-23 10:12 PM
Re: shell/run enhancements

I started thinking about that too but didn't check it out.
checked it now and sadly, shellExecuteEx() (for the shell object) is not available for scripting.

so, the enhancement suggestion gets my vote.
maybe even create a new function named RunEx() or similar that holds zillion arguments and can handle all these.