|
Each contribution is licensed to you under a License Agreement by its owner, not Microsoft. Microsoft does not guarantee the contribution or purport to grant rights to it.
|
Categories |
Listing NTFS Properties(Community)
Script Code
VBScript
On Error Resume Next
Set oShell = WScript.CreateObject("WScript.Shell")
sRegKey = oShell.RegRead ("HKLM\System\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation")
If IsNull(sRegKey) Then
Wscript.Echo "No value set for disabling 8.3 file name creation."
ElseIf sRegKey = 1 Then
WScript.Echo "No 8.3 file names will be created for new files."
ElseIf sRegKey = 0 Then
Wscript.Echo "8.3 file names will be created for new files."
End If
sRegKey = Null
sRegKey = oShell.RegRead ("HKLM\System\CurrentControlSet\Control\FileSystem\NtfsAllowExtendedCharacterIn8Dot3Name")
If IsNull(sRegKey) Then
Wscript.Echo "No value set for allowing extended characters in 8.3 file names."
ElseIf sRegKey = 1 Then
WScript.Echo "Extended characters are permitted in 8.3 file names."
ElseIf sRegKey = 0 Then
Wscript.Echo "Extended characters not permitted in 8.3 file names."
End If
sRegKey = Null
sRegKey = oShell.RegRead ("HKLM\System\CurrentControlSet\Control\FileSystem\NtfsMftZoneReservation")
If IsNull(sRegKey) Then
Wscript.Echo "No value set for reserving the MFT zone."
ElseIf sRegKey = 1 Then
WScript.Echo "One-eighth of the disk has been reserved for the MFT zone."
ElseIf sRegKey = 2 Then
Wscript.Echo "One-fourth of the disk reserved for the MFT zone."
ElseIf sRegKey = 3 Then
Wscript.Echo "Three-eighths of the disk reserved for the MFT zone."
ElseIf sRegKey = 4 Then
Wscript.Echo "One half of the disk reserved for the MFT zone."
End If
sRegKey = Null
sRegKey = oShell.RegRead ("HKLM\System\CurrentControlSet\Control\FileSystem\NtfsDisableLastAccessUpdate")
If IsNull(sRegKey) Then
Wscript.Echo "No value set for disabling the last access update for files and folder."
ElseIf sRegKey = 1 Then
WScript.Echo "The last access timestamp will not be updated on files and folders."
ElseIf sRegKey = 0 Then
Wscript.Echo "The last access timestamp updated on files and folders."
End If
sRegKey = Null
sRegKey = oShell.RegRead ("HKLM\System\CurrentControlSet\Control\FileSystem\Win31FileSystem")
If IsNull(sRegKey) Then
Wscript.Echo "No value set for using long file names and timestamps."
ElseIf sRegKey = 1 Then
WScript.Echo "Long file names and extended timestamps are used."
ElseIf sRegKey = 0 Then
Wscript.Echo "Long file names and extended timestamps are not used."
End If
Platforms
For online peer support, join
The Official Scripting Guys Forum!
To provide feedback or report bugs in sample scripts, please start a new discussion on the Discussions tab for this script.
Disclaimer
The sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.
Be the first to create a discussion.
|