Hello dear guest!

Boot Land is a community driven pc software site established since 2006 and focused on recovery/backup boot disks, research of Microsoft Windows 2000/XP/2003/Vista/7 install/deployment/lease/antivirus/antispam tools, customizing Microsoft Windows PE administration systems and even learning how to recover computer data from disaster situations!

How about joining our boot disk community? So do it. Life's short!

  - You get free access to our newsletter with all the interesting buzz about boot disks
  - We share publicity revenue with everyone who wishes to participate at the forums
  - Publicity is never, never, never displayed to members (along with many other cool things)
http://boot-land.net/register


 ShellExecute, Maybe necessary to enhance
post Dec 27 2008, 06:55 PM
Post #1
psc
Guru   ******
Group: .script developer

  Joined: 14-July 06 From: Korschenbroich

Posts: 9,611
Thank(s): 637


Germany


EDIT by psc:
I (or better said Jaclaz) moved this post and two answers to this new topic.
That holds things locically combined.
Let's begin with this topic as background!
/EDIT

QUOTE (psc @ Dec 25 2008, 10:47 AM) *
This is easy be answered:

ShellExecute waits for the end of the Imdisk process, while ShellExecuteEx does not.

But why ShellExecute needs such a lot of time, while the direct imdisk command in cmd.exe box does not?

I'll have a look into the shellexecute source code.

Peter


I did have the look into the source code and I decided:

The changes I made during the 'Delete after execute' discussion, are technically nonsence.
They do not go syncronous with wy opinion and I only implemented them, because they have been suggested by a couple of (partly experienced) members.

IMHO A process is 'ENDED' when the ExitCode has a value different from 'STILL_ACTIVE'. And every opinion of everybody else does not change that!

I reverted to the code which is correct 'In My Humble Opinion'.

Now the unmount of ImDisk by WB Command 'ShellExecute' is done within one or two seconds like e.g. in version 074 times.

The 'Delete after execute' issue is caught by the new Command 'ShellExecuteDelete' (and if necessary may need one minute waiting for the 'Garbage Collection' to finish).

Everything else works like in WinBuilder's Ice-Age.

Please inform me if there are some new issues.

Peter

Appendix for programmers:
WB Statement: ShellExecute,Open,imdisk.exe,"-D#$s-m#$sY:"

My Code, process time ~ 1 second:
CODE
              while GetExitCodeProcess(exinfo.hProcess, exitcode) and
                    (exitcode = STILL_ACTIVE) and (Scripthalt = False) do
                  begin
                    ProcessMessages; //application.ProcessMessages;
                    if scriptHalt then
                      terminateProcess(exInfo.hProcess, WM_QUIT);
                  end;

Proposed (current) code, process time ~ 35 seconds:
CODE
              while True do
                  begin
                    if WaitForSingleObject(ExInfo.hProcess, 500) = WAIT_OBJECT_0 then
                      break;
                    ProcessMessages; //application.ProcessMessages;
                    if scriptHalt then
                      terminateProcess(exInfo.hProcess, WM_QUIT);
                  end;
                  GetExitCodeProcess(exinfo.hProcess, exitcode);


--------------------
Build the house starting with the basement rather than with the roof! But always have in mind how the roof should be made!

There are very rarely problems, in most cases there are issues.

There are never stupid questions, there can be only stupid answers.

It does not make much sence to heal the symptoms of an illness. You must heal the illness!

The revenue from clicking on publicity at this post is helping psc
Boot Land shares publicity revenue with its members.

.
+Quote Post
 
Start new topic
Replies (1 - 5)
post Dec 28 2008, 12:21 AM
Post #2
Lancelot
Frequent Member   ****
Group: .script developer

  Joined: 8-May 08 From: Turkiye/Izmir

Posts: 747
Thank(s): 622


Turkiye


QUOTE (psc @ Dec 27 2008, 08:55 PM) *
because they have been suggested by a couple of (partly experienced) members.
As Being one of the member [Alexei,Amalux (rarely and not recently),Gooroo] who had most freqent errors and reports smile.gif, as long as ShellExecuteDelete works as it was before, there is no problem to me.
ps: I believe this is not a winbuilder issue, this happens with some executables (7z sfx, unzip.exe) and never happens with other executables, besides we need winbuilder help with an extra command to overcome when happens which we have ShellExecuteDelete.

QUOTE (psc @ Dec 27 2008, 08:55 PM) *
Please inform me if there are some new issues.
After getting new nighty beta smile.gif as long as ShellExecuteDelete works as before and imdisk works as you pointed, case closed.


--------------------
I Galapo's LiveXP and King Amalux's Great LiveXP Package (tutorial and everything)
Lancelot Tips For LiveXP
I hate Medusa problems of WinBuilder, Cryptic codes, syntax rules fakingly mismatching working lines, not having even basic fundemantal syntax rules and mostly 'lies' and 'post games'.
('post games' = includes dishonest, childish posts that have goal to annoy others in community)
+Quote Post
post Dec 28 2008, 09:56 AM
Post #3
fxscrpt
Frequent Member   ***
Group: .script developer

  Joined: 15-September 08
Posts: 347
Thank(s): 63


Germany


QUOTE (psc @ Dec 27 2008, 07:55 PM) *
...
I reverted to the code which is correct 'In My Humble Opinion'.
....

Peter,
i have downloaded newest beta from your signature,
but its still beta5I and there is no diffrence.
Maybe your upload failed. Waiting for new beta....

BTW:
I think the problem of the 35 sec code are rarely processed windows messages.

Thanks,
Peter
+Quote Post
post Dec 28 2008, 11:45 AM
Post #4
psc
Guru   ******
Group: .script developer

  Joined: 14-July 06 From: Korschenbroich

Posts: 9,611
Thank(s): 637


Germany


QUOTE (fxscrpt @ Dec 28 2008, 10:56 AM) *
i have downloaded newest beta from your signature,
but its still beta5I and there is no diffrence.
Maybe your upload failed. Waiting for new beta....

I did not make the upload yet. (this was the only change and in my opinion not very important.)

But as you and Lancelot seem to be very interested, I'll do now and create the 'J'

Peter


--------------------
Build the house starting with the basement rather than with the roof! But always have in mind how the roof should be made!

There are very rarely problems, in most cases there are issues.

There are never stupid questions, there can be only stupid answers.

It does not make much sence to heal the symptoms of an illness. You must heal the illness!
+Quote Post
post Dec 28 2008, 03:54 PM
Post #5
Lancelot
Frequent Member   ****
Group: .script developer

  Joined: 8-May 08 From: Turkiye/Izmir

Posts: 747
Thank(s): 622


Turkiye


QUOTE (psc @ Dec 28 2008, 01:45 PM) *
But as you and Lancelot seem to be very interested, I'll do now and create the 'J'
Thank you smile.gif.


--------------------
I Galapo's LiveXP and King Amalux's Great LiveXP Package (tutorial and everything)
Lancelot Tips For LiveXP
I hate Medusa problems of WinBuilder, Cryptic codes, syntax rules fakingly mismatching working lines, not having even basic fundemantal syntax rules and mostly 'lies' and 'post games'.
('post games' = includes dishonest, childish posts that have goal to annoy others in community)
+Quote Post
post Dec 29 2008, 08:30 AM
Post #6
fxscrpt
Frequent Member   ***
Group: .script developer

  Joined: 15-September 08
Posts: 347
Thank(s): 63


Germany


Thanks,

Now process time ~ 2 seconds.

Peter
+Quote Post

Reply to this topic
1 User(s) are reading this topic ()



Collapse

  Topic Replies Topic Starter Views Last Action
No New Posts ShellExecute - cmd problem
9 MedEvil 520 16th May 2010 - 05:14 PM
Last post by: MedEvil
No New Posts Shellexecute,XXX
anything can be used
0 pecd.net 148 3rd March 2010 - 07:41 AM
Last post by: pecd.net
No new Topic has attachmentsShellExecute+Delete Executable Issue
How to avoid
20 psc 2,667 4th November 2008 - 12:05 PM
Last post by: psc
No New Posts ShellExecute
2 Max_Real Qnx 1,478 23rd August 2008 - 10:22 PM
Last post by: Max_Real Qnx
No New Posts ShellExecuteEx
Strange behaviour on Shell Extentions.
3 psc 1,919 9th July 2008 - 01:24 PM
Last post by: psc







  
Display Mode: Switch to: Standard · Linear+ · Switch to: Outline