There are often times where I want to modify either the read-only or writeable portion of a Workspace Virtualization layer. One of the things that makes this challenging is that the sublayer values are assigned when the layer is imported. I have found that I have to keep recreating a script to find the layers magic number. I have decided to finally write the blog post so I don't have to rewrite this script every time.
I hope this helps someone in the future.
Dim layerName, strComputer, objWMIService, selectStatement, colItems, layerGuid
Dim thisLayer, registryPath, filePath, readOnlyMagicNumber, writeableMagicNumber
' Check to make sure there is a layer name on the command line.
If WScript.Arguments.Count = 0 Then
WScript.Echo "You must specify a layer name on the command line"
' Get the Layer Name from the commandline