Reputation: 411
I need to read a value from the registry and then check if contains the name of an old server.
I did this vbs but I'm receiving the error "Object required: " in the IF statement.
Any clue on what I'm doing wrong ?
Thanks
Dim objShell,strDocuments
Set objShell = WScript.CreateObject("WScript.Shell")
strDocuments = objShell.RegRead("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal")
If strDocuments.Contains("\\oldServer\homes") then
WScript.Echo "Documents pointing to the old server"
End If
Upvotes: 1
Views: 131