Jump to content











Photo
- - - - -

dll and ocx


  • Please log in to reply
79 replies to this topic

#26 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 27 July 2007 - 02:18 PM

@Nuno
Ok now you've got my puzzled. I even tried it on a second computers, after you said it would work for you, just to be on the safe side.

I have absolutely no idea, why the bat behaves so differently for you. :yahoo:

Maybe psc or somebody else can test it too, or has an idea what's going on.

:)

btw. Tested on XPSp1pro and XPSP2pro, both german.

#27 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 27 July 2007 - 02:30 PM

This is the default behavior that most IT portuguese people would expect - reason why I stranged the lack of the WAIT switch in the first place.. :yahoo:

#28 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 27 July 2007 - 02:50 PM

Nuno, it's not like i don't believe you in the first place, it just makes no sense. Why would the command interpreter work on portuguese machines different?
I've tryed it in the mean time also on a english and a russian XPSP2 pro. Same result.

Does portuguese DOS also behave this way?

:yahoo:

#29 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 July 2007 - 03:12 PM

What I'm now doing:

  • create a key HKCR\WB-Temp and do the register work into this key
  • transfer the key's tree completely into the mounted hive
  • values w/o a path unchanged
  • values with path
  • change type from 0x1 to 0x2
  • change the path to %SystemRoot%\...
[/list]

Finished that :yahoo:
Does anybody have a small app with registerable dll or ocx for test?

Peter

#30 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 July 2007 - 03:44 PM

Sorry.. but the above posted batch file will launch explorer and also launch notepad at nearly the same time (notepad even comes up first, guess explorer is sluggier..)

Running this file from explorer - the batch console window only closes after both apps are closed.

I'm using Windows XP SP2 Home OEM (Fujitsu Siemens) Portuguese [5.1.2600]


VMWare XPP_SP2_PT (Iberian):
Test.cmd contents:
explorer
notepad

Notepad appears after closing explorer

Again Voodoo on Nuno's machine?

Peter

#31 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 27 July 2007 - 04:18 PM

That's the reason why I've recorded to youtube.. :)

Continued with testing and non-explorer.exe files wait - but explorer.exe itself won't wait and will immediately launch the next app.. :yahoo:


Of course that I've googling for some evidences or reasons to explain this matter but my searchs came out empty - yet - this happens..

@echo off 

explorer.exe

notepad.exe

explorer.exe

regedit.exe

This snippet will launch both explorer and notepad at the same time.

Only close notepad and another explorer window and regedit are launched at the same time, having two new explorer windows and a regedit (should I also upload to youtube this one? :) )


If the PRO edition behaves as expected - has anyone tried running this under the HOME edition? :)

(will also check on the other partition running XP PRO to hopefully replicate the same results as Peter under vmware..)

#32 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 27 July 2007 - 04:28 PM

@psc
Folder Match is quite smalish and one of the nasty buggers i can't get to run, without proper installation.
www.foldermatch.com

@Nuno
I may would have believed that all portuguese versions behave that way, but never that home and pro versions handle this code differently.

:yahoo:

PS: No need for a directors cut of Test.bat :)

#33 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 27 July 2007 - 04:33 PM

@Nuno
PPS: That strange behaviour would suggest that the explorer.exe kicks of another explorer.exe and then exits.
You don't have by any chance a bat or link file that is called explorer.exe in your path? :yahoo:

#34 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 July 2007 - 04:45 PM

@Nuno
PPS: That strange behaviour would suggest that the explorer.exe kicks of another explorer.exe and then exits.
You don't have by any chance a bat or link file that is called explorer.exe in your path? :yahoo:


Why not simply remove explorer from the test batch and use calculator / notepad?

Peter

#35 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 27 July 2007 - 04:56 PM

Not really.. this happens because explorer.exe is already loaded.

When I terminate explorer.exe witht the taskmanager and directly load c:\test.bat from the run box inside task manager it will work - launching the explorer shell again (only the start menu and no explorer window open) and once I terminate the process again - notepad is launched! :)

But heck.. this is a serious limitation - shouldn't be needed to do this sort of actions in the first place. :)

This XP is a recently installed OS (around a week) and I'm using it to showcase a real condition - not fun when people mention that they run the batch file and nothing happens as on my machine.. :)

Since this only applies to explorer.exe in particular, I think other apps should run well.

I'm really sorry for this off topic matter - was really annoying not knowing why this occured only on this machine. (shouldn't there be a registry settings to control this?? :))

:yahoo:

#36 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 27 July 2007 - 05:03 PM

Not really.. this happens because explorer.exe is already loaded.

:yahoo: I hope you're not suggesting that Peter and i had terminated explorer.exe before running your script! :)

:)

edit:

Discovered the mysterious problem. You are not running the (file)explorer.exe in a own process.
Setting is in folder options. Hope you know what i mean. If not, maybe Peter can tell you how this feature is called on a portuguese XP.

But one thing i would be still interested. What happens when you use start /wait explorer.exe? That should also not work.
Or wait till you close the desktop! :)

#37 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 July 2007 - 05:05 PM

I'm really sorry for this off topic matter - was really annoying not knowing why this occured only on this machine. (shouldn't there be a registry settings to control this?? :yahoo: )

I already tried the tweaks:
  • start in a separate process
  • new window
Did not get Nuno's 'parallel' result.

Peter

#38 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 27 July 2007 - 05:17 PM

Ooops, did a little cross posting.

Turning off 'run in a seperate process' did not give you the same result as Nuno? It worked for me. :yahoo:

:)

#39 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 July 2007 - 05:37 PM

Ooops, did a little cross posting.

Turning off 'run in a seperate process' did not give you the same result as Nuno? It worked for me. :)

:yahoo:


I'll check again :)

Peter

EDIT: RESULT: With unchecked 'Start in separate process' I get Nuno's result.

#40 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 27 July 2007 - 05:41 PM

:) I hope you're not suggesting that Peter and i had terminated explorer.exe before running your script! :)


No, but it would be evil to make me spend the whole afternoon trying to figure the reason why.. :)


Discovered the mysterious problem. You are not running the (file)explorer.exe in a own process.
Setting is in folder options. Hope you know what i mean. If not, maybe Peter can tell you how this feature is called on a portuguese XP.

But one thing i would be still interested. What happens when you use start /wait explorer.exe? That should also not work.
Or wait till you close the desktop! :yahoo:


Yes, same result given here with Start /WAIT explorer.exe (both apps open at the same time)

Yet, as Peter mentioned - using any other app will make things work as expected, it's just that I stranged when I noticed the explorer.exe being launched on the initial posted batch file with the registry redirection. If we are launching an app then this annoyance won't occur at all - just a boring/unusual coincidence to lose valuable debug time.. :)

RegReMapper Explorer.exe

Should work just fine..


I'm tempted to think on this as a default explorer option for HOME users not reflected on the PRO edition.

:)

#41 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 July 2007 - 06:00 PM

Now, after I#ve finished my primary idea of RegSvrWB, let's go back to MedEvil's post #12!

With the knowledge I got during coding of that program, it is easy to write the RegMap and RegUnMap in a short time.

But I have some concerns:

During the time the 'MedEvil' keys are mapped, every write into registry is written to 'MedEvil'.

That may be unimportant keys. E.g. your antivir tries to make a database update at home, and stores the time of update.
In this case our Install Script will get 'foreign' information.

But that may also be important data (I have no sample, but I'm sure it can happen)
These important data are lost.

Maybe the install procedure can be made in Safe Mode. I do not know what's possible there.

BTW: What does "RegReMapper Explorer.exe" mean?
Maybe it is one of the items PMed between Nuno and MedEvil. But I have no idea ...

Peter

#42 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

Posted 27 July 2007 - 06:04 PM

Ooops, did a little cross posting.

Turning off 'run in a seperate process' did not give you the same result as Nuno? It worked for me. :yahoo:

:)

What are the results using
explorer /separate
or
start /wait explorer /separate
? Have you tried configuring a different shell other than explorer.exe in the registry?

Many Greetings
MichaelZ

#43 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 July 2007 - 06:12 PM

What are the results using

explorer /separate
or
start /wait explorer /separate
? Have you tried configuring a different shell other than explorer.exe in the registry?

Many Greetings
MichaelZ


The start swich 'separate' is for 16bit apps and means 'start in separate memory area'.

Peter

#44 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 27 July 2007 - 06:18 PM

...
BTW: What does "RegReMapper Explorer.exe" mean?
Maybe it is one of the items PMed between Nuno and MedEvil. But I have no idea ...
...


This whole discussion began after I've done a small test batch because I was unsure if the explorer or other app would really wait to be concluded and then continuing to process the batch script.

My small test initially proved (to me) that batch files wouldn't wait when launching two apps (explorer and notepad) - however after both you and MedEvil state otherwise we've began the iterations to discover why it would occur only on my machine.

Good to see that we've come to the conclusion that this was a unfortunate coincidence because changing the execution order (first notepad and then explorer) would work as expected from the start never needing to spend any more time with further experiences since I'd be happy with the results and confirm (mostly just for safety check) that the batch file is doable in concept without strange unexpected issues.
RegReMapper Explorer.exe

Comes from the batch sample posted by MedEvil on reply #12 of this discussion and was the point where I had doubts about working in correctly under batch environment.




What are the results using

explorer /separate
or
start /wait explorer /separate
? Have you tried configuring a different shell other than explorer.exe in the registry?

Many Greetings
MichaelZ


I'm using Windows without any tweaking - it's an OEM version but it's a quite standard XP that can be found on most laptops (presently being replaced with vista on newer machines)

Using
@echo off 

explorer /separate

notepad.exe

Works as expected in the first place!! :yahoo:

#45 MichaelZ

MichaelZ

    Frequent Member

  • Team Reboot
  • 333 posts
  • Location:Braunschweig, Germany
  •  
    Germany

Posted 27 July 2007 - 06:31 PM

The start swich 'separate' is for 16bit apps and means 'start in separate memory area'.

Peter

I disagree on this one, Peter (although I might be wrong...). I think /separate is an undocumented switch for explorer.exe that tells 'run as separate process' independently from the setting in options. And it also disables (some or all) tests and special handlings by explorer when explorer.exe is the shell of the session. But probably this getting now really :yahoo:

Many Greetings
MichaelZ

#46 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 July 2007 - 06:44 PM

I disagree on this one, Peter (although I might be wrong...). I think /separate is an undocumented switch for explorer.exe that tells 'run as separate process' independently from the setting in options. And it also disables (some or all) tests and special handlings by explorer when explorer.exe is the shell of the session. But probably this getting now really :)

Many Greetings
MichaelZ

You are right, MichaelZ :)
As a 'start' switch it would be before the 'explorer'
Sorry and thanks :yahoo:

Peter

#47 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 28 July 2007 - 12:44 PM

I programmed the Registry Redirection using 'RegOverridePredefKey' like proposed by MedEvil.
  • Good news: It works
  • Bad news: The redirection is only valid for the current process.
    That means: Redirection does not remain when the redirecting program finishes.
Peter

#48 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 28 July 2007 - 12:56 PM

What if your app launches a batch file instead of the EXE directly - wouldn't it help? :yahoo:

#49 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 28 July 2007 - 01:23 PM

What if your app launches a batch file instead of the EXE directly - wouldn't it help? :yahoo:


I tried:
Before exiting, the program waits for console input.
I registered an OCX. But the register data did not arrive in the redirection target.

Result:
The redirection is valid for the causing process only, not during lifetime of the causing process.

I tried to let a child process do the OCX registry.
The registry has beeen don (ok message) but the data did not arrice, too.

I have no more idea.

Peter

#50 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 28 July 2007 - 04:55 PM

A user called John has just refered JauntPE and it might actually help to complete this missing step.

What this program does, is take Almost any program and makes it portable by redirecting the registry and file system changes it might make.
unfortunately, it cant catch 'everything' due in some part just to plain system limitations, and in part to how the program your trying to use with JPE was coded.


http://www.portablef...opic.php?t=1528
http://www.portablef...wforum.php?f=10
http://www.portablef...opic.php?t=1824

In the meanwhile, also found another program (not sure how good)

http://portableapps....registry_rapper

Registry Rapper is a template for allowing the use of programs that save their settings to the reigstry as portable applications. First it will check the registry for settings of the program and then save them if present. Then it will write the settings for the program to the registry, run the program and then rewrite the registry settings to a file for later use. It will then delete the settings from the registry; removing any trace of the program. Finally rewritting the original current local settings back to the registry. This program is a registry encapsulation program, which takes care of all the registry settings a program might need to run and make sure nothing is left behind on the host system. Allowing programs that were not created is portable (i.e saving their settings to .ini files within the program folder) to be used as portable.



:yahoo:




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users