doestergaard Posted December 22, 2014 Posted December 22, 2014 Hi I'm writing a script which will return the driveletter where Windows is installed. It is going to be used for reinstallation, so that it will write a diskpart script which formats the partition so no other partition is touched. The question is how and I hope that someone with a bit more skills than me can help me out. I know that you are able to retrieve disk drives and partitions via WMI, and I think that the solution lies somewhere in there. Hope you can help me out. Thanks in advance!
Solution jguinch Posted December 22, 2014 Solution Posted December 22, 2014 DriveGetDrive should suffice, no ? Local $aDrives = DriveGetDrive("FIXED") For $i = 1 To $aDrives[0] If FileExists($aDrives[$i] & "\Windows\explorer.exe") Then ConsoleWrite("Windows folder found in " & $aDrives[$i] & @CRLF) Next Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now