Multi-OEM/Retail Project {MRP} - Mk3

Discussion in 'MDL Projects and Applications' started by mxman2k, Oct 15, 2016.

  1. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,262
    94,712
    450
  2. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    5,758
    19,293
    180
    For some reason the qt not run properly from a pshell prompt or if a pshell window open so i put that check in to prevent false qt results.

    I forgot i added that check in, it was, if i remember that a couple of qt users found problems when pshell was used or detected running.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,262
    94,712
    450
    It was the first time i had a ps window open long enough for it to interfere :D:D
     
  4. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    5,758
    19,293
    180
    :D :D

    I think winpe is checked for too and will exit the qt as winpe not have some os parts the qt requires such as .net stuff.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,341
    7,060
    210
    Will test with RC1, no need for convo.
     
  6. Dubioza Kolektiv

    Dubioza Kolektiv MDL Addicted

    Dec 27, 2012
    867
    1,463
    30
  7. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    5,758
    19,293
    180
    Interesting that the vbscript still continued and shown the Adapter 2 data :eek: even with a forced script quit if any Adapter has no Video Ram :g:

    It is hard to replicate so i can make adjustments so for now i will leave that section alone or it could get very confusing :D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,341
    7,060
    210
    It's strange, did you change the query? It doesn't even return the inactive adaptor anymore, thus no error can be set and exit the script?
     
  9. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    5,758
    19,293
    180
    i have just now added the on error bit and test for script failures to QT 110 rc2 and uploaded that with the edited vbs in the zip.

    That *should* abort the vbs and make the QT use the WMic routine... if this dont then i am at a loss why it fails to exit vbs - may have to return it back to original one so that a error is given...

    Have a works meeting and then a few jobs to catch up about the home before i head off to work later so i be able to reply until later this evening.

    The query in rc1 is the same i just checked for adapterram being nothing (non existant) then exited but it seems vbs had other plans.. :D:D

    On error in vbscript is not as good as VBasic as you have limited options in vbs, but it should work - you can view the vbs and see i have checked at a few points where an error may occur and quit the script - *if* i got the check right.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,341
    7,060
    210
    I have checked (inserted an Echo line) and The Error variable is NOT set to 1, it stays at 0. The initial query cannot have data about adaptor 1, as the error routine passes with Error 0. If it was present, it would be shown, then, no?
     
  11. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    5,758
    19,293
    180
    I may have to re-write the vbs at some point as that one was designed that if there was more than 4GiB vram it should of been shown correctly, but as the API is limited to the 4GiB max then the routine used is relatively wasted.

    There again i may just remove it totally and let wmic do its job as it is roughly the same routine but simpler to work with, i was just trying to get better results.

    Will see when i get a bit of spare time to have a rethink about the vbs side.

    As mentioned the On Error bit on vBscript is a bit limited.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    5,758
    19,293
    180
    QT 110-RC3

    Have tweaked the vBscript with more checks and i tested with a value/object that not exist and the on error check worked and exited the vbs so that Wmic took over :)

    While i was on my breaks at work last night i did a bit of reading up on checking vars etc in VBscript and there is so much to understand still, but i tested the theory this morning when i got home and the result is the new vbs script which seems to be working ok...

    VbScript is weird to say the least in that say you want to check a variable is nothing or empty, with cmd script you check with 'IF "%TestVar%" = "" blah blah' or 'IF NOT DEFINED TestVar blah blah' , so easy BUT In VbScript you have to be creative, so if testvar is null/empty/not exist you need to use 'IF IsNull(TestVar) OR IsEmpty(TestVar) then blah blah' also error control is quite fussy too...

    So the new vbscript will check if the objectitem (AdapterRAM in this case) exists or is empty then set the error routine and exit to force WMIC to take over, there is a bit more involvement in the script but that is the general idea.

    I was not going to let this beat me, sadly the 4 GiB limitation has for now...

    If this works, ( or if it fails then i remove the vbs part totally ), either way the QT v110.0 is about ready for release. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    5,758
    19,293
    180
    Looks like the new vbs checking worked and exited to allow the Wmic part to operate... :D:D

    Plus showing the correct configuration (in this scenario) of the 'dual' gfx adapters.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,341
    7,060
    210
    Tests on my part are now finished, and I'll delete the test versions and samples provided.
     
  15. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    5,758
    19,293
    180
    ok many thanks , it has helped me learn a few new things along the way too :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream

    Dec 21, 2012
    6,341
    7,060
    210
    That's how it should be. :)
     
  17. mxman2k

    mxman2k MDL Developer

    Jun 20, 2007
    5,758
    19,293
    180
    Query Tool v110.0 has been uploaded, 2nd post's download link, password and hashes have been updated. :)

    + Updated the VBScript {Ref:v} that obtains the graphics card information, if there is an error with adapterRAM ie non existant then the vbscript will exit forcing the WMIC {Ref:w} routine to gracefully obtain what it can. On rare devices some graphics card data for a specific adapter may not show due to the way the routine need to error check, so for those rare events one or more graphics adapters may not be shown.

    + If the AdapterRAM cannot be converted then you will see 'xxxxxxx Bytes' in the Video Memory line to show what actual bytes value was returned when using the WMIC method. This is a last resort as sometimes the convertion process can get confused, or a AntiVirus has removed some of the QT's external programs/scripts.

    + Various internal code updates and error checking for other areas of the QT have been done which may take a little longer to process some sections.

    Many thanks to @Carlos Detweiller for their time and patience when testing the various methods and QT's while sorting the errors with the VBScript for a rare but awkward dual graphics adapter{s}.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...