8 Replies Latest reply on Jan 31, 2011 7:32 AM by bcasler

    How to invoke "elevated priviledges" using Provisioning

    Specialist

      I was having problems getting my Win7 Product Key passed through UNATTEND.XML and so I was trying to use SLMGR.VBS to change the product key late in provisioning and then to force activation.

       

      My provisioning template was hanging on the step where I called: SLMGR.VBS /ipk <win7key>

      The error I got when I tried it manually read: "access denied: the requested action requires elevated privileges

       

      My question is this:

      How do I give provisioning FULL and ABSOLUTE control over my clients so that I have "elevated priviledges"?

       

       

      for what its worth I resolved the product key problem...I just don't want to run into this kind of error again.

      thanks

       

        • 1. Re: How to invoke "elevated priviledges" using Provisioning
          Apprentice

          I am also using this script but do not get prompted for priveleges. This is how i call it:

           

          cscript //b c:\windows\system32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

           

          followed by:


          cscript //b c:\windows\system32\slmgr.vbs /ato

           

           

          See if that helps.

          • 2. Re: How to invoke "elevated priviledges" using Provisioning
            Specialist

            you are not getting the prompt because you are calling it with UNATTEND.XML.

             

            I was trying to call it outside of unattend well after mini-setup was complete and the machine had rebooted into the OS.

             

            But remember that I resolved the problem with activation already, this post is about how I avoid running into permission problems in the future.

             

            You might benefit from a solid answer to this question as well given your own problems with trying to delete your unattend file.  Remember that provisioning isn't working with elevated priviledges for you either.

             

             

             

             

            STILL UNANSWERED.

            • 3. Re: How to invoke "elevated priviledges" using Provisioning
              Spartan Apprentice

              Good Day,

               

              I'm running into similar issues, provisioning is not working as it did in 8.8 (other then the task being hidden).

              I whish we could make it run like it did in 8.8 as we still run XP on 2/3 of our fleet and the Windows 7 portion has UAC disabled anyways.

               

              I'm still looking/waiting for a proper solution.

               

               

              This is what I have done... it's ugly but it works.

              I have resorted to placing commands (those that don't seem to be working right) in batch files then have the OS run them after a reboot.

              My during this process my provisioning task is waiting for a file which is created in my last batch command. Once the file shows up provisioning just resumes as usual.

               

              I did this with my Windows 7 activation and it works well.

              Also had to do this with my EXE based drivers most of these did not install if I ran the batch file from provisioning.

              • 4. Re: How to invoke "elevated priviledges" using Provisioning
                Apprentice

                I put the

                cscript //b c:\windows\system32\slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX-XXXXX (x's replaced with my key info)

                 

                followed by:


                cscript //b c:\windows\system32\slmgr.vbs /ato

                 

                and it did not seem to activate the product any thoughts

                • 5. Re: How to invoke "elevated priviledges" using Provisioning
                  Specialist

                  I presume you mean that you are referencing lines in your unattend.xml file.  I would double-check not only your syntax but also the location of your entries to be sure they are in the right location.  Additionally, you should make sure the order # for each command puts the /ato last and the key first.

                   

                  One of my mates was able to get both of these commands to work out using unattend.xml.  I saw it myself so I know it works; I'm just not certain of the details so I can't provide you with a critique.  IIRC these entries would not have been any earlier than pass #4 in unattend.xml.  We have since removed the /ato line from Unattend.xml so that we can control if and when the activation takes place.

                  • 6. Re: How to invoke "elevated priviledges" using Provisioning
                    Specialist

                    I'm trying to bring this one back to life as most of the replies focused on how to activate windows 7 and that isn't really what I wanted solved.  -remember that I was able to solve my activation problems already, so this thread isn't about that.

                     

                     

                    What I need to ensure is the following:

                     

                    When I elect to run any provisioning task, whether it be a simple two line task or a 100 line task, I want to be sure that what I am requesting of provisioning is being done with ADMINISTRATOR rights.  That is to say you can double-click on a program in windows 7 and it may run with lowered rights.  If you right-click on the same program you can choose the option to RUN AS ADMINISTRATOR.

                     

                    My question is HOW DO I ENSURE that steps performed in provisioning are being performed with ADMINISTRATIVE rights?  Say I wan't to run a program that UAC might try to stop, how do I ensure that provisioning will execute the step and bypass UAC, etc?

                     

                    -thanks

                    • 7. Re: How to invoke "elevated priviledges" using Provisioning
                      Apprentice

                      Provisioning will be running everything as the local system account.  Although this has full admin rights, those rights do not extend beyond the local machine you are targeting.  So its not the same as running something as a domain or even local admin account (local accounts might still have access to other devices or network shares).  In your opening comment you talk about running a vb script.  I'd guess that something in that script is trying to do something that requires access outside of the local machine - maybe you're doing an LDAP lookup or accessing something on a network share.

                       

                      Steve

                      1 of 1 people found this helpful
                      • 8. Re: How to invoke "elevated priviledges" using Provisioning
                        Apprentice

                        I turn off UAC in my in my image then at the end of may provisioning i turn it back on with a batch file. the reason i do it in the image is you need a reboot BUT you could put a scripted turn off of UAC do a provisioning reboot task and move on in provisioning if you want

                         

                        UAC turn on

                        @ echo on

                        Bcdedit.exe -set TESTSIGNING OFF

                        exit /b