Run my shell minimized

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to run the cmd shell minimized...how do I set this up. Also, if in the future I choose to run my application as a shell, how would I run it minimized. Thanks in advance,...on a different note, is something wrong with the newsgroup search function? It does not seem to find anything that I search for. I use keywords in the search engine that I know for certain exist in lots of messages, but nothing is found?! Anyway...thank

-saaby
 
I need to run the cmd shell minimized...how do I set this up.

I don't think there is a way to do that from TD, with a registry hack or
something like this.
However, you can make you own app as a shell that will launch
(ShellExecute/CreateProcess) the CMD in minimized mode (SW_MINIMIZE).
Also, if in the future I choose to run my application as a shell, how
would I run it minimized.

Why would you need that? Wouldn't your app supposed to be a "shell" app?
Anyway.. either you go with the same little pre-shell app as described above
to launch you "heavy" shell app. Or you make appropriate changes in your
main shell app (if you have source code for it) to minimize its windows
(ShowWindow API, or appropriate parameters for CreateWindow API).
Thanks in advance,...on a different note, is something wrong with the
newsgroup search function? It does not seem to find anything that I search
for. I use keywords in the search engine that I know for certain exist in
lots of messages, but nothing is found?! Anyway...thanks

What newsgroup client do you use? If it is OE, you are unlikely be able to
do the newsgroup search unless you have installed a third party plug-in
(like Fidolook Express).
 
Ok, my app starts as a shell...but I also need a command prompt window in the background to open up. So I added cmd.exe to the run key in the registry. I added the registry stuff under "Extra Registry Data" which is under my .slx project. I created the run key and created the cmd.exe value as a string to be run

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\ (ONLY KEY
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Command Shell (VALUE CMD.EXE

when xpe boots up, it runs my app since its the shell, but will not run cmd.exe?? What am I doing wrong

-saaby
 
I thought that you confirmed that you will use suggestion that Konstantin
gave you.

Use CreateProcess from your application to position and execute command
prompt.

Regards,
Slobodan

Saaby said:
Ok, my app starts as a shell...but I also need a command prompt window in
the background to open up. So I added cmd.exe to the run key in the
registry. I added the registry stuff under "Extra Registry Data" which is
under my .slx project. I created the run key and created the cmd.exe value
as a string to be run:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\ (ONLY KEY)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Command Shell (VALUE CMD.EXE)

when xpe boots up, it runs my app since its the shell, but will not run
cmd.exe?? What am I doing wrong?
 
Its complicated. My program will not run without first restarting my "Can" card's driver using devcon...and I need cmd.exe running because of that. The company does not support xpe. And this is the only way I got the driver working ...by installing and restarting it with devcon.ex

-saaby
 
Saaby,

I don't know the specs for your target platform (any end user GUI?) but
probably for the testing purposes the easiest way for you handle your setup
is to run CMD as a shell specifying a batch file as argument ("/K
<you_file.bat>"). The batch may call devcon to install and restart the
driver, then it may either run your shell application or do nothing. Either
case you will get the CMD up and running (in background in first case).

You can always implement any logic (even that you specified) in your
application. C++ or Delphi will allow you to accomplish what you want.

--
KM,
BSquare Corporation
Its complicated. My program will not run without first restarting my
"Can" card's driver using devcon...and I need cmd.exe running because of
that. The company does not support xpe. And this is the only way I got the
driver working ...by installing and restarting it with devcon.exe
 
I'm not sure that I can follow what you are saying, but...
If you need to call devcon then you can incorporate part of its source in
your app, or call devcon from your init application.

Regards,
Slobodan

Saaby said:
Its complicated. My program will not run without first restarting my
"Can" card's driver using devcon...and I need cmd.exe running because of
that. The company does not support xpe. And this is the only way I got the
driver working ...by installing and restarting it with devcon.exe
 
Thanks guys...but out of curiousity...why won't cmd.exe launch at winxpe startup...any other .exe that I place in the run key runs except cmd.exe...I just find this strange thats all.

-saaby
 
Saaby,

As you don't have Explorer Shell, FBA should take care of the Run key
values. So, I would take a look at the FBALog.txt to see if there is any
error and something was set up wrong.
Also, to be perfect, you can make an FBA RunOnce request (Run) in TD Extra
Resources or in your own component instead of playing with the Run key
directly.

--
KM,
BSquare Corporation
Thanks guys...but out of curiousity...why won't cmd.exe launch at winxpe
startup...any other .exe that I place in the run key runs except cmd.exe...I
just find this strange thats all.
 
Back
Top