Announcement

Collapse
No announcement yet.

Sysprep turns System Restore back OFF on a drive

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sysprep turns System Restore back OFF on a drive

    MOD EDIT: Merged similar threads:

    Originally posted by balubeto - 'Command that enables the recovery system on a partition'
    HI


    In Windows 7 SP1, I can not find a command that enables the restore system on a local partition.


    THANKS


    BYE
    Originally posted by balubeto
    HI

    I have partitioned a disk into two primary partitions.

    On one of them, I installed Windows 7 SP1 Ultimate 64 bit, but, during its installation, I pressed, the Ctrl+Shift+F3 sequence to go in audit mode.
    Now, wanting to activate the D local partition to the protection system, I wrote:

    PS: Enable-ComputerRestore -Drive "D:\"
    ==> http://img28.imageshack.us/img28/4268/protectionsystem01.png

    or
    DOS: wmic /namespace:\\root\default path SystemRestore call Enable D:\
    ==> http://img62.imageshack.us/img62/7747/protectionsystem02.png

    but the D partition is still deactivated.

    Why? So, how can I fix this?

    THANKS

    BYE

    Originally posted by balubeto - 'Settings of the protection system is not maintained from audit to normal mode'
    HI

    In Windows 7 SP1 64 bit, I have noticed that if, in audit mode, I activate an local partition (D: ) to protection system with the wmic /namespace:\\root\default path SystemRestore call Enable D:\ command and I reboot the system in this mode, this protection is still activated on this partition. Instead, when I go in normal mode with the sysprep /generalize /oobe /reboot command, the protection system is deactivated on this partition. Why? How do I fix this?

    THANKS

    BYE
    Originally posted by balubeto - 'Running wmic command in OOBE mode'
    HI

    When Windows 7 is started in OOBE mode with the command from the audit mode, there is a key/entry registry that allows to execute a wmic command during the Windows configuration wizard?

    THANKS

    BYE
    Originally posted by balubeto - 'Running the SetupComplete.cmd file between the audit and the OOBE mode'
    HI


    I want to know if during the switching between the audit and the OOBE mode with the sysprep /generalize /oobe /reboot command, the SetupComplete.cmd file is executed.

    If this file is executed, I would like to know how do I create it so that it contains the wmic /namespace:\\root\default path SystemRestore call Enable D:\ command and that, at the end of its execution, this file will be deleted automatically with its log file.


    THANKS


    BYE
    Last edited by Rems; 4th May 2012, 23:14.

  • #2
    Re: Command that enables the recovery system on a partition

    Originally posted by balubeto - 'Command that enables the recovery system on a partition'
    HI


    In Windows 7 SP1, I can not find a command that enables the restore system on a local partition.


    THANKS


    BYE
    Is this Windows System Restore or a restore partition provided by the computer manufacturer?
    Last edited by Rems; 4th May 2012, 22:48.
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      Re: Command that enables the Restore System on a partition

      Originally posted by Ossian View Post
      Is this Windows System Restore or a restore partition provided by the computer manufacturer?
      I'm talking about how to configure the Windows Restore System from the Command Prompt.

      THANKS

      BYE

      Comment


      • #4
        Re: Command that enables the Restore System on a partition

        AFAIK System Restore is a GUI tool, but it can be launched from the cmd prompt:
        http://windows.microsoft.com/en-GB/w...command-prompt

        You can create a restore point using a script:
        http://answers.microsoft.com/en-us/w...f-c1b749c23320

        There are some other scripts that, in combination, may allow you to apply a restore point:
        http://gallery.technet.microsoft.com...stem%20Restore

        Note these are VB scripts, not CMD, so will need the scripting engine available.
        Last edited by biggles77; 24th April 2012, 19:30. Reason: Fixed the broken link
        Tom Jones
        MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
        PhD, MSc, FIAP, MIITT
        IT Trainer / Consultant
        Ossian Ltd
        Scotland

        ** Remember to give credit where credit is due and leave reputation points where appropriate **

        Comment


        • #5
          Re: Command that enables the Restore System on a partition

          Originally posted by Ossian View Post
          AFAIK System Restore is a GUI tool, but it can be launched from the cmd prompt:
          http://windows.microsoft.com/en-GB/w...command-prompt

          You can create a restore point using a script:
          http://answers.microsoft.com/en-us/w...f-c1b749c23320

          There are some other scripts that, in combination, may allow you to apply a restore point:
          http://gallery.technet.microsoft.com...site/search/?f[0].Type=RootCategory&f[0].Value=desktopmanagement&f[0].Text=Desktop%20Management&f[1].Type=SubCategory&f[1].Value=sqlserver&f[1].Text=System%20Restore

          Note these are VB scripts, not CMD, so will need the scripting engine available.
          Since the Enable-ComputerRestore -Drive "F:\" command wants the Administrator rights, in interactive Windows Powershell started from Command Prompt, how do I do this?

          THANKS

          BYE

          Comment


          • #6
            Re: Command that enables the Restore System on a partition

            Find powershell, right click, select RUN AS ADMINISTRATOR is the normal way

            Or else I really don't understand what you are wanting to do
            Tom Jones
            MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
            PhD, MSc, FIAP, MIITT
            IT Trainer / Consultant
            Ossian Ltd
            Scotland

            ** Remember to give credit where credit is due and leave reputation points where appropriate **

            Comment


            • #7
              Re: Command that enables the Restore System on a partition

              Originally posted by balubeto View Post
              Since the Enable-ComputerRestore -Drive "F:\" command wants the Administrator rights, in interactive Windows Powershell started from Command Prompt, how do I do this?
              Using Powershell command ( Enable-ComputerRestore -Drive "f:\" ); - open a powershell as administror the way Ossian described.
              Or.. you could run the PS script as a computer Startup Script.

              Or,

              Using a dos command from a command prompt ( wmic /namespace:\\root\default path SystemRestore call Enable f:\ ); - Open a Elevated Command Prompt by a right click the Command Promt icon, select RUN AS ADMINISTRATOR.
              Or.. you could run the command as a computer Startup Script.

              /Rems

              This posting is provided "AS IS" with no warranties, and confers no rights.

              __________________

              ** Remember to give credit where credit's due **
              and leave Reputation Points for meaningful posts

              Comment


              • #8
                Re: Settings of the protection system is not maintained from audit to normal mode

                Originally posted by balubeto - 'Settings of the protection system is not maintained from audit to normal mode'
                HI

                In Windows 7 SP1 64 bit, I have noticed that if, in audit mode, I activate an local partition (D: ) to protection system with the wmic /namespace:\\root\default path SystemRestore call Enable D:\ command and I reboot the system in this mode, this protection is still activated on this partition. Instead, when I go in normal mode with the sysprep /generalize /oobe /reboot command, the protection system is deactivated on this partition. Why? How do I fix this?

                THANKS

                BYE
                This is done on purpose. System restore was able to save sensitive information (your product key from your unattend file, for example). There is a blog post by Michael Niehaus which explains it in detail. I would give you a link to the blog post, but I can not post links on this site yet. The title of the article is "MDT 2010 Update 1: Fix to re-enable System Restore in ConfigMgr task sequence". The easiest way to turn this back on would be to run a post-installation task to run a script to turn it back on.

                Hope this helps,
                David
                Windows Outreach Team – IT Pro
                Last edited by Rems; 4th May 2012, 22:45.

                Comment


                • #9
                  Re: Running the SetupComplete.cmd file between the audit and the OOBE mode

                  Originally posted by balubeto - 'Running the SetupComplete.cmd file between the audit and the OOBE mode'
                  HI


                  I want to know if during the switching between the audit and the OOBE mode with the sysprep /generalize /oobe /reboot command, the SetupComplete.cmd file is executed.

                  If this file is executed, I would like to know how do I create it so that it contains the wmic /namespace:\\root\default path SystemRestore call Enable D:\ command and that, at the end of its execution, this file will be deleted automatically with its log file.


                  THANKS


                  BYE
                  Setupcomplete.cmd runs after setup is finished, and before the login screen appears. This would be after the reboot, when setup is done asking questions about locale, computer/user names, etc...
                  Just add the commands to the file as you would type them in a command window while in audit mode, then sysprep as you normally would.

                  Hope this helps,
                  David
                  Windows Outreach Team - IT Pro
                  Last edited by Rems; 4th May 2012, 22:50.

                  Comment


                  • #10
                    Re: Settings of the protection system is not maintained from audit to normal mode

                    Originally posted by WinOutreach4 View Post
                    Originally posted by balubeto - 'Settings of the protection system is not maintained from audit to normal mode'
                    HI

                    In Windows 7 SP1 64 bit, I have noticed that if, in audit mode, I activate an local partition (D: ) to protection system with the wmic /namespace:\\root\default path SystemRestore call Enable D:\ command and I reboot the system in this mode, this protection is still activated on this partition. Instead, when I go in normal mode with the sysprep /generalize /oobe /reboot command, the protection system is deactivated on this partition. Why? How do I fix this?

                    THANKS

                    BYE
                    This is done on purpose. System restore was able to save sensitive information (your product key from your unattend file, for example). There is a blog post by Michael Niehaus which explains it in detail. I would give you a link to the blog post, but I can not post links on this site yet. The title of the article is "MDT 2010 Update 1: Fix to re-enable System Restore in ConfigMgr task sequence". The easiest way to turn this back on would be to run a post-installation task to run a script to turn it back on.

                    Hope this helps,
                    David
                    Windows Outreach Team – IT Pro

                    check also Bill Stewart's solution here: http://groups.google.com/group/micro...deaf2d1b041723

                    edit the wmic command that will be entered in the [GuiRunOnce] section of the
                    sysprep.inf file so that it does enable the drive (d: ) in your case.

                    /Rems
                    Last edited by Rems; 4th May 2012, 23:22.

                    This posting is provided "AS IS" with no warranties, and confers no rights.

                    __________________

                    ** Remember to give credit where credit's due **
                    and leave Reputation Points for meaningful posts

                    Comment


                    • #11
                      Re: Sysprep turns System Restore back OFF on a drive

                      the post WinOutReach referred to is here:

                      http://blogs.technet.com/b/mniehaus/...-sequence.aspx

                      sigpic


                      Please do show your appreciation to those who assist you by leaving Rep Point

                      Comment


                      • #12
                        Re: Settings of the protection system is not maintained from audit to normal mode

                        For WinOutreach4:

                        Could you explain what file I should edit and how?

                        For Rems:

                        This procedure is also valid for Windows 7 SP1?

                        THANKS

                        BYE

                        Comment


                        • #13
                          Re: Settings of the protection system is not maintained from audit to normal mode

                          Originally posted by balubeto View Post
                          For Rems:

                          This procedure is also valid for Windows 7 SP1?

                          THANKS

                          BYE
                          ahh no it's not, sysprep.inf was used for Windows XP. Use <FirstLogonCommands> in unattend.xml.

                          /Rems
                          Last edited by Rems; 5th May 2012, 21:34.

                          This posting is provided "AS IS" with no warranties, and confers no rights.

                          __________________

                          ** Remember to give credit where credit's due **
                          and leave Reputation Points for meaningful posts

                          Comment


                          • #14
                            Re: Sysprep turns System Restore back OFF on a drive

                            @TehCamel - Thanks for the link.

                            @Balubeto - The Setupcomplete.cmd file needs to be created in the Windows\Setup\scripts directory. You will have to create the scripts directory also. To create the file, just use a text editor like Notepad and save it as Setupcomplete.cmd. Inside the file, you can type each command on it's own line. Be aware that this file runs as the 'System' account.

                            Hope this helps,
                            David
                            Windows Outreach Team - IT Pro

                            Comment

                            Working...
                            X