IR5 - The Official Windows 7 Rearm Solution

Discussion in 'MDL Projects and Applications' started by timesurfer, May 10, 2010.

Thread Status:
Not open for further replies.
  1. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    My console batch file is bit different, it does not have the removeTask part at the end.

    You need not remove the last two lines, it displays the "Press any key to continue..." part.

    I just now re-did the keys part of the batch file. I used VBScript instead of Findstr.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #482 timesurfer, Jun 14, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
  3. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    #483 MasterDisaster, Jun 14, 2010
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #484 timesurfer, Jun 14, 2010
    Last edited: Jun 14, 2010
    (OP)
    Hi, I just tested the new script and and after logon I got black screen with console and .vbs warning or error.

    And key is not installed yet.

    Key did not install automatically and watermark is still there

    Edit: Second try same outcome

    Here's what happened

    1. Blank cmd window wiht cursor blinking
    2. Then message box (window script host)

    - script c:\key.vbs
    - line 3
    - charr 224
    - error expected
    - code 800A03EE
     
  5. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    Just now tested my script and everything is working.

    Click install again and check whether the key is set in the reset.bat.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    Your batch file still has the change InstallDate line. That line is giving you the problem. You have missed the quotes around date and time.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #487 timesurfer, Jun 14, 2010
    Last edited by a moderator: Apr 20, 2017
    (OP)
  8. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    True, where did you get this old bat from? you could have changed the batch file from 2.4
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #489 timesurfer, Jun 14, 2010
    Last edited: Jun 14, 2010
    (OP)
    I dunno...lol Just organized things in a "current" folder...lol

    But it looks fine now right?

    I am going to test brb

    Your code works but I don't usually get a non-genuine window that offers for me to ask later and upon login into desktop it gives console flash for a second

    I think the way we have right now with 2.4 is fine but I like the more streamline looking code though
     
  10. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    I didn't like the look of the code, it was like a mess so I wanted to change it.

    The new code uses the Scripting.Dictionary object of VBScript that stores data in Key/Value pair. Lot more easier to do things. Load all the editions and its corresponding key into the dictionary. Just check if the Key exists and display the value.

    The output of the script file is stored in the PIDKEY variable and later used for creating the installkey.bat.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    What do you think of reboot automatically after the reset.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
  13. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    #493 MasterDisaster, Jun 15, 2010
    Last edited: Jun 15, 2010
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #494 timesurfer, Jun 15, 2010
    Last edited: Jun 15, 2010
    (OP)
    I meant if someone enters reset.bat incorrectly it should not restart until entered correctly thats all...lol Error checking prior to restart or message to try again


    I was thinking adding some reminders right before they click ok but mainly I was asking should I do a "yes/no" or just "OK"

    Just asking...lol You were trying to eliminate steps so so was I...lol

    And I was still wondering if it's ideal to import task before or after RE

    Edit: OK on import time we'll leave it before
     
  15. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    #495 MasterDisaster, Jun 15, 2010
    Last edited by a moderator: Apr 20, 2017
    If someone types reset.bat incorrectly, the cmd window itself will show batch file not found. No need for error checking.

    OK is good.

    Add this to line 86 just before attrib +h %file%
    Code:
    echo wpeutil reboot >>%file%
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #496 timesurfer, Jun 15, 2010
    Last edited: Jun 15, 2010
    (OP)
    Yea I liked ok. Some guy said he chose no with 2.4 and thought he was done so with OK he has to finish instructions which I could add to the OK box but I did include the printable instructions for people who want to print out incase they forget the RE process

    So only if it says successful will it restart automatically

    Edit: OK so here is the info I will attempt to put in ok message box:

    Click OK to restart your PC.

    Remember to press F8 at boot then select "Repair your computer"

    Enter your language and logon info`n`n4) When the System Recovery window opens look for where it says "Operating System: windows 7 on (C:) Local disk".

    Does it says (C:), (D:), or (E:)

    Then select Command Prompt and type either "C:RESET", "D:RESET", or "E:RESET" (without quotes) and press enter
     
  17. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    Try out my code, you'll understand. It will display "The operation completed successfully." and then reboot instantly.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    If your going to eliminate the restart after c:reset has been entered you can use the 1.bat in the 2.5 link above

    Could you give me link to see the code?
     
  19. MasterDisaster

    MasterDisaster MDL Expert

    Aug 29, 2009
    1,255
    675
    60
    #499 MasterDisaster, Jun 15, 2010
    Last edited by a moderator: Apr 20, 2017
    It is on the previous page.

    Just add the following line at line #86 before attrib +h %file%
    Code:
    echo wpeutil reboot >>%file%
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. timesurfer

    timesurfer MDL Developer

    Nov 22, 2009
    8,524
    4,112
    270
    #500 timesurfer, Jun 15, 2010
    Last edited by a moderator: Sep 14, 2014
    (OP)
    Test this and tell me what you think


    Please read directions and all message/confirmations boxes