Page 1 of 1 1
Topic Options
#213758 - 2019-10-24 03:43 PM Run Program minimized
DaveLipman Offline
Fresh Scripter

Registered: 2005-07-13
Posts: 29
Loc: NJ, USA
I want to be able to RUN a program but have it be minimized and not maximized.

Presently when I use RUN ("prog.exe") the program runs maximized. How can I RUN the program so that that it loads minimized or once it has loaded maximized, minimize it ?

Top
#213759 - 2019-10-24 05:33 PM Re: Run Program minimized [Re: DaveLipman]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4489
Loc: USA
It will likely require using start. If you go to a cmd prompt and type start /? you will get all the parameters, but /MIN is likely the one you are looking for.

Something like:
shell '%comspec% /c start /MIN program.exe'

Top
#213760 - 2019-10-24 06:18 PM Re: Run Program minimized [Re: Allen]
DaveLipman Offline
Fresh Scripter

Registered: 2005-07-13
Posts: 29
Loc: NJ, USA
Perfect !

Xiexie ni.

Top
#213761 - 2019-10-24 07:12 PM Re: Run Program minimized [Re: DaveLipman]
AndreLuiz Online   content
Getting the hang of it

Registered: 2015-10-07
Posts: 84
Loc: Brasil, João pessoa
[Pt-br]
Olha tinha uma udf por aqui que ela fazia isso, mas infelizmente não estou encontrando.
Mas você pode fazer o seguinte, eu até acho melhor usar assim:

[Eng(Google Translate)]
Look there was a udf around here that she was doing this, but unfortunately I'm not finding it.
But you can do the following, I even think it's better to use it like this:
 Code:
By default it is minimized!
execRun("cmd.exe", '/c echo ola mundo') ;or execRun("cmd.exe")


Function execRun($prog, optional $args, optional $title, optional $cfg, optional $nv_process)
	if ($cfg = 1)
		$cfg = "/max"
	else
		$cfg = "/min"
	endif
	select
		case ($nv_process = 0)
			$nv_process = "/LOW"
		case ($nv_process = 1)
			$nv_process = "/ABOVENORMAL"
		case ($nv_process = 2)
			$nv_process = "/BELOWNORMAL"
		case ($nv_process = 3)
			$nv_process = "/HIGH"
		case ($nv_process = 4)
			$nv_process = "/REALTIME"
		case 1
			$nv_process = "/NORMAL"
	Endselect
	Run '%comspec% /c start '+$nv_process+' '+$cfg+' "'+$title+'" %comspec% /k ""'+$prog+'" $args"'
EndFunction

Top
#213762 - 2019-10-24 08:59 PM Re: Run Program minimized [Re: AndreLuiz]
DaveLipman Offline
Fresh Scripter

Registered: 2005-07-13
Posts: 29
Loc: NJ, USA
Obrigado.
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 167 anonymous users online.
Newest Members
GBMicros, Jodey, Hiker, GTRoberts, KatieQuinn
17685 Registered Users

Generated in 0.036 seconds in which 0.012 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org