The parameter expands /ato support to identify a Windows edition installed on the computer. Note: Starting in Windows 8 (and Windows Server 2012), the /stao option is deprecated. Systems that have been set to suspend automatic KMS activation attempts ( /stao) still try KMS activation when /ato is run. For systems that have a Generic Volume License Key (GVLK) installed, this prompts a KMS activation attempt. This operation must be run from an elevated Command Prompt window, or the Standard User Operations registry value must be set to allow unprivileged users extra access to the Software Protection Service.įor retail editions and volume systems that have a KMS host key or a Multiple Activation Key (MAK) installed, /ato prompts Windows to try online activation. To prevent instability in the license service, the system should be restarted or the Software Protection Service should be restarted. If a key is already installed, it is silently replaced. If the key is valid and applicable, the key is installed. The product key provided by the parameter is confirmed valid and applicable to the installed operating system. Password for the account that has the required privileges on the remote computer Name of a remote computer (default is local computer)Īccount that has the required privilege on the remote computer The remote machine does not support this version of SLMgr.vbs General Slmgr.vbs options Option Microsoft (R) Windows Script Host Version 5.8Ĭopyright (C) Microsoft Corporation. For example, running cscript slmgr.vbs /dlv produces the following output: Trying to manage an older system from Windows 7 or Windows Server 2008 R2 will generate a specific version mismatch error. Using Slmgr.vbs to manage a Windows 7 or Windows Server 2008 R2 system from the Windows Vista® operating system is not supported. My output reads: Drives: C:\ D \ J:\ ( J:\ being my DVD drive.Because of WMI changes in Windows 7 and Windows Server 2008 R2, the Slmgr.vbs script is not intended to work across platforms. But the command fsutil fsinfo drives does. Note that this batch method does not identify DVD drives, not sure why. Set =A B C D E F G H I J K L M N O P Q R S T U V W X Y Zįor %%- in (%%) do if exist %%-: vol %%-: | find "in drive" Batch File echo Available Drives:įor %%v in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist "%%v:\\" Here's my batch file which includes both for commands you can comment-out the for command that you do not want to run by prefixing command lines with two colons ( ::). Volume in drive C is OS Volume in drive D is DATA The results from the original identified all available drive letters mixed in with for command processing the full set of capital letters. I placed a pause command so that it wouldn't be necessary to run a "Command Prompt" beforehand in order to see the results when clicking on the batch file. I piped the results to the external find command to filter serial number lines created by the vol command. The added command line off filtered the output to show results only. Testing the omission the two back slashes yields the same results. Since if exist will be checking for drive letters only, there will never be a space character in this test, so I omitted the double quotes. I also used the set command to create the variable that would contain the full set of capital letters in order to shorten the for command's length. I wanted to share my batch edit/modification that based on cybercontroler's answer.įor my current project, I needed to identify which drive labeled as DATA so I replaced the echo command with vol (internal command). I absolutely love the pure batch method shown in the answer from cybercontroler, all internal commands no less!
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |