Topic: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.  (Read 14363 times)

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #20 on: April 27, 2017, 01:10:44 PM »

ZYX

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Apr 2017
  • Posts: 59
Ok, I understand that it is needed for various stuff, but you said that "ExpEnvVar.exe will support what you are after." Is that means that the .exe file already supports disabling of the checking of tag file without the need for its modification and recompilation? In another words, could I disable that checking by modification of ShortcutsCentro by myself, if you don't have time for that?

I just would like to get yes/no answer, I don't want to waste my time analyzing its code just to find out that that is not possible.

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #21 on: April 27, 2017, 01:22:11 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
you said that "ExpEnvVar.exe will support what you are after."

Yes, that's right. The executable itself already has built into it the ability to able to use whatever tag file is specified on the commandline. It is not limited to MEDIA.DRIVE.

However, like I said, the Gena project does not yet leverage that functionality to do what you desire. Someone will need to code this into the project, starting with the ShortcutsCentro plugin.

Regards,
Galapo.
« Last Edit: April 27, 2017, 01:22:49 PM by Galapo »

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #22 on: April 27, 2017, 01:47:03 PM »

ZYX

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Apr 2017
  • Posts: 59
Sorry for bothering you, but I think you didn't understand my request. I don't want an ability to specify any tag file. I want to be able to completely disable tag file checking during boot. Is that possible or not?

What is the purpose of this checking if everything is working fine without found MEDIA.DRIVE file?

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #23 on: April 28, 2017, 12:55:57 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Hi ZYX,

The fact that your PE is working fine means that ExpEnvVar.exe, along with the tag file, are doing their job.  :great: Remove either of them and like I said you will completely stuff up your PE. If either was not needed, then we wouldn't be making use of them. :thumbsup:

ExpEnvVar.exe accomplishes a number of tasks at boot and cannot be removed without another program being written to do the same things.

The tag file is needed so that the drive can be identified and various shortcuts and registry entries that couldn't be written at build-time due to the unknown drive letter can be written and generated at boot-time. So remove the tag file and you will have shortcut and registry problems in your PE, particularly under various conditions.

The tag file mechanism can be improved, as you suggest. The person to do this will need to start with the ShortcutsCentro plugin and work out from there.

Regards,
Galapo.

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #24 on: April 28, 2017, 05:39:23 AM »

ZYX

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Apr 2017
  • Posts: 59
The fact that your PE is working fine means that ExpEnvVar.exe, along with the tag file, are doing their job.  :great: Remove either of them and like I said you will completely stuff up your PE.
...
So remove the tag file and you will have shortcut and registry problems in your PE.
It seems you still don't understand. Here is what I said few posts ago:

When I remove MEDIA.DRIVE from the root of the UFD, I get the mentioned message on the boot, but after that it seems that everything is working fine.
That's right, in many of my tests I don't have MEDIA.DRIVE file in the root of UFD, and yes, I get the message how that file is missing, but after I click on the OK button I get all schortcuts fine and everything is working fine. How is that if you say that it is needed?

I understand that ExpEnvVar.exe is needed for a number of other tasks at boot, but I don't want it to do the tag file checking. Ok, maybe that tag file is really needed in some occasions with some another configurations, but that should not be a reason for such nuisance with that message in other configurations like mine. Maybe there is a way that you find out in which configurations it is needed during build and only in that case that it is set for checking on the boot.

As I said, what is also important with that tag checking beside of that annoying message, is the fact that your tag checking is slowing down the boot significantly, especially with computers containing many disk partitions. For me, and I suppose for many other users, the boot time is very important characteristic of WinPE.

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #25 on: April 28, 2017, 11:13:50 AM »

Lancelot

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Date Registered: Sep 2010
  • Posts: 10350
Hi ZYX, Galapo,

There are 3 reasons I know that effects scan drives.

* Empty Floppy

ZYX make sure
Gena\Components\Tweaks\"Remove Floppy A Mount Point"
or
Gena\Components\Tweaks\"Remove Floppy ALL Mount Point 'BL MountVol'"
Selected

* Empty MMC Card Reader

@Galapo
As far as I remember
Gena\Apps\Portable Finder CMD
Avoid this Empty MMC thing

Also
At
SE\Build\CdDrive - X: - Y:
Chris might did something to "MountPEMedia.exe" to avoid Empty MMC delay.




:turtle:

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #26 on: April 29, 2017, 01:59:38 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
That's right, in many of my tests I don't have MEDIA.DRIVE file in the root of UFD, and yes, I get the message how that file is missing, but after I click on the OK button I get all schortcuts fine and everything is working fine. How is that if you say that it is needed?

Yep, that's expected. ExpEnvVar.exe is smart. :smile: It has detected an end-user making a mistake and has chosen to attempt what it detects as the mostly likely configuration to get a working PE. :great: :great:

Maybe there is a way that you find out in which configurations it is needed during build and only in that case that it is set for checking on the boot.
Yes, it's basically under all conditions when programs are run from a location other than %SystemDrive%.


@Lancelot
I can't see within 'Portable Finder CMD' or MountPEMedia.exe where MMC delay is avoided.

I do have MMC stuff coded into Flush.exe and call pull stuff from there if needed.

By the way, you said you knew three reasons that give a drive scanning delay, but only gave us two.  :wink:

Regards,
Galapo.

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #27 on: April 29, 2017, 06:25:27 AM »

ZYX

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Apr 2017
  • Posts: 59
No, I don't have floppy drives or card readers in my test computers. I do have CD-drives in my two laptops, but as you could see from the tests that I posted in another thread (http://theoven.org/index.php?topic=2110.msg23313#msg23313), the newest desktop computer which don't even have CD drive is slower than the older laptop which have CD drive. However, that newer computer has one more internal HD drive having more partitions, and I suspect that is a reason for slower boot on newer and faster computer. And as I said in that another thread, when I had attached one external USB hard drive, I got at least 10 seconds longer boot. I am pretty sure that searching for the tag file causes that.

@Galapo
Do ExpEnvVar.exe have any command line switch to turn off checking for MEDIA.DRIVE file? Is there any way to force it to "attempt what it detects as the mostly likely configuration to get a working PE" without displaying that annoying message about missing tag file?

By the way, it is not my end-user mistake if I have two or more ISO files made on different dates put on the same UFD with single MEDIA.DRIVE in the root of UFD, in which case I would get the another error message during boot with all ISOs, except the one which is that tag file.

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #28 on: April 29, 2017, 04:24:36 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Hi ZYX,

I have just uploaded an updated version of the ShortcutsCentro plugin. It now has some options for more advanced tagfile naming. For example, you can locate tagfiles into a tagfile folder and have different ones there for different builds.

Still to do:
1) Update WimBoot
2) Update ExpEnvVar.exe to support disabling of build-date checking

Regards,
Galapo.

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #29 on: April 29, 2017, 04:38:34 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
WimBoot now updated as well.

Regards,
Galapo.

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #30 on: April 29, 2017, 05:05:41 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
And tagfile date checking can now be disabled. Of course, do this at own risk.  :wink:

Regards,
Galapo

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #31 on: April 29, 2017, 06:53:23 PM »

ZYX

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Apr 2017
  • Posts: 59
Galapo, thank you very much for this! It works great!

I have tested several different basic configurations until now (BootDI_CAB+My_WimPack_Outside_System, WimBoot+My_WimPack_Outside, WimBoot+WimPack_VMDK_Outside) with single MEDIA.DRIVE in the root and didn't get error message with any of them, all shortcuts are there and programs are starting fine.

If I knew that my request could be accomplished without modification of ExpEnvVar.exe I wouldn't bother you so much before trying to change ShortcutsCentro by myself.

I have just one small suggestion and one question. The check box has caption: "Disable ExpEnvVar.exe tagfile date checking (only enable if you know what your're doing)". I think that someone could think that used "enable" verb is related to the tag checking, but not to the checked state of the control, i.e. it could be interpreted as "Enable ExpEnvVar.exe tagfile checking only if you know what you are doing". I think it would be better if you use term "turn on" or "check on" or "tick on" - i.e. "only check on if you know what you are doing".

The question is related to the %ProgramTitle% variable. What is it? Is it just "Gena" or it could be user specified? I already saw that in some plugin code and tried to find it where could be defined. It seems to me that all builds made by Gena have that same %ProgramTitle% and hence I don't know how that variable is useful in naming tag file. I doubt that I will ever use some another tag name different than the default one, since I have now that disabled date checking that you added, just saying my opinion about it.

Thanks again!

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #32 on: April 30, 2017, 05:24:14 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Hi ZYX,

Thanks for your feedback and comments.

I've uploaded another updated version. This has your suggestion of more clear information in the new checkbox. Also it now checks whether shortcuts.exe is selected for PE1 and provides a message to instead use FreeShc.exe.

%ProgamTitle% in a plugin is a variable specified for each plugin. It will be listed under [Variables].

Regards,
Galapo.

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #33 on: April 30, 2017, 09:07:23 AM »

ZYX

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Apr 2017
  • Posts: 59
Thanks!

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #34 on: May 07, 2017, 09:22:10 AM »

ZYX

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Apr 2017
  • Posts: 59
WimBoot now updated as well.

I am getting an error with the initial empty project and this update. Here is the relevant part of log file:
             [Success] IF - [] is not equal to: [backup] evaluated string: [If,Not,%backup%,Equal,backup,Begin]
                   [Success] IniRead - [%BaseDir%\Projects\Gena\script.project] Section [IniVariables] Key [Media_Tagfile] to variable: [%Media_Tagfile%] with value []
                   [Success] IF - [] is equal to: [] evaluated string: [If,%Media_Tagfile%,Equal,"",Begin]
                         [Ignore] IF - File exists: [%BaseDir%\ISO\Gena\HddBoot\MEDIA.DRIVE] evaluated string: [If,Not,ExistFile,%RAMFolder%\%pTextBox5%,FileCreateBlank,%RAMFolder%\%pTextBox5%]
                         [Success] ELSE - executing command: [Begin]
                               [Success] StrFormat - converted: [%TargetDir%\%Media_Tagfile%] to variable: [%Media_Tagfile_Filename%] with result: []
                               [Success] StrFormat - converted: [%TargetDir%\%Media_Tagfile%] to variable: [%Media_Tagfile_Folder%] with result: [%BaseDir%\Target\Gena\]
                               [Ignore] IF - Directory exists: [%BaseDir%\Target\Gena\] evaluated string: [If,Not,EXISTDIR,%Media_Tagfile_Folder%,DirMake,%Media_Tagfile_Folder%]
                               [Success] IF - File does not exist: [%BaseDir%\Target\Gena\] evaluated string: [If,Not,ExistFile,%TargetDir%\%Media_Tagfile%,FileCreateBlank,%TargetDir%\%Media_Tagfile%]
                              [Failed] Cannot create file "%BaseDir%\Target\Gena\". The system cannot find the path specified: [FileCreateBlank,%TargetDir%\%Media_Tagfile%]
                              [Warning] Halt
                         Run - Processed section [Perform-RAM_exclude] in file: [%BaseDir%\Projects\Gena\Finals\2 Create Image\WimBoot.script]

I think you have one End on wrong place. Here is your added code:
    If,%Media_Tagfile%,Equal,"",Begin
      If,Not,ExistFile,%RAMFolder%\%pTextBox5%,FileCreateBlank,%RAMFolder%\%pTextBox5%
      Else,Begin
        StrFormat,FILENAME,%TargetDir%\%Media_Tagfile%,%Media_Tagfile_Filename%
        StrFormat,PATH,%TargetDir%\%Media_Tagfile%,%Media_Tagfile_Folder%
        If,Not,EXISTDIR,%Media_Tagfile_Folder%,DirMake,%Media_Tagfile_Folder%
        If,Not,ExistFile,%TargetDir%\%Media_Tagfile%,FileCreateBlank,%TargetDir%\%Media_Tagfile%
      End
    End

It works fine with this:
    If,%Media_Tagfile%,Equal,"",Begin
      If,Not,ExistFile,%RAMFolder%\%pTextBox5%,FileCreateBlank,%RAMFolder%\%pTextBox5%
    End
    Else,Begin
      StrFormat,FILENAME,%TargetDir%\%Media_Tagfile%,%Media_Tagfile_Filename%
      StrFormat,PATH,%TargetDir%\%Media_Tagfile%,%Media_Tagfile_Folder%
      If,Not,EXISTDIR,%Media_Tagfile_Folder%,DirMake,%Media_Tagfile_Folder%
      If,Not,ExistFile,%TargetDir%\%Media_Tagfile%,FileCreateBlank,%TargetDir%\%Media_Tagfile%
    End

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #35 on: May 07, 2017, 01:20:29 PM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
Thank you for reporting this. I have uploaded an updated version.

Regards,
Galapo.

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #36 on: May 09, 2017, 06:42:12 AM »

ZYX

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Apr 2017
  • Posts: 59
I am thinking to write my own plugin for adding portable apps or to modify some existing one, it should find the booting drive. I could use the approach used in WimPack whose WimMount.cmd looks for a drive with the WIMs folder when VMDK is enabled, but I would like to avoid that because it is just another scanning of drives which could slow down the boot.

Is there any way to:
- start some batch file after ExpEnvVar finished with scanning and found the booting drive containing MEDIA.DRIVE;
- get the drive letter of the booting drive from it?

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #37 on: May 09, 2017, 08:32:24 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
At boot you will have a %CDDrive% variable set containing the drive letter where MEDIA.DRIVE tagfile was found.

Booting drive for PE will always be %SystemDrive% and thus X:.

Regards,
Galapo.

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #38 on: May 09, 2017, 10:04:38 AM »

ZYX

  • Code Baker
  • Jr. Chef
  • **
  • Date Registered: Apr 2017
  • Posts: 59
Sorry for not being clear and for wrong terminology. I have multiple WinPEs put on the same UFD as ISOs or extracted their image files, e.g. into I386 folder, all made with BootDI or WimBoot. I have on the same UFD one folder containing portable apps, e.g. Programs, and MEDIA.DRIVE in its root. I have Syslinux boot manager and I choose from its menu which PE I want to boot.

After I boot one PE, I get its system folder always on X:, but the Programs folder is on the UFD which has not a fixed drive letter, it could be any, so I need to find it out scanning all drives for that folder.

If I understand you correctly, the %CDDrive% variable contains the drive letter where MEDIA.DRIVE was found by ExpEnvVar which will be my UFD. I am now wondering, when exactly that happens during boot. If I want to modify e.g. WimPack whose WimMount.cmd is executed during boot, will it have %CDDrive% already determined? Is your ExpEnvVar.exe executed and set the mentioned variable before WimMount.cmd starts?

Re: ExpEnvVar, MEDIA.DRIVE & BootDI HDD image.
« Reply #39 on: May 09, 2017, 10:13:09 AM »

Galapo

  • Moderator, Gena Baker
  • Grand Chef
  • *****
  • Location: Australia
  • Date Registered: Sep 2010
  • Posts: 2207
If I understand you correctly, the %CDDrive% variable contains the drive letter where MEDIA.DRIVE was found by ExpEnvVar which will be my UFD.

Yes, that's right.

Is your ExpEnvVar.exe executed and set the mentioned variable before WimMount.cmd starts?

The relevant ExpEnvVar.exe call is made under RunOnceEx registry entry with the name '480'. WimPack runs with the name '000', so it executes earlier.

Regards,
Galapo.

 

Powered by EzPortal