Set-RDRemoteApp -CollectionName "Remote Desktop" -Alias "MEDENT_RDS" –IconPath "c:\medent\bin\webmed.exe" -IconIndex 0
·
Start the Registry Editor as an Administrative User.
·
Navigate to, take ownership of, and grant yourself Full Control
permission to the key HKEY_CLASSES_ROOT\AppID\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}
·
Rename the value RunAs to
_RunAs.
· Close Regedit.
https://superuser.com/questions/290940/how-to-launch-windows-explorer-with-the-privileges-of-a-different-domain-user
'BaseProfile DesktopSizeKB AppDataRoamingMB AppDataLocalMB AppDataLocalLowMB NTUserSizeMB FavoritesKB DownloadsMB DateTimeScanned
if wscript.arguments.count > 0 then
sBaseProfilePath = wscript.arguments(0)
set objFS = CreateObject("scripting.filesystemobject")
on error resume next
'wscript.echo sBaseProfilePath & "\desktop"
if objFS.FolderExists(sBaseProfilePath & "\desktop") then
set fDesktop = objFS.GetFolder(sBaseProfilePath & "\desktop")
'set fFoldersAppDataLocal = objFS.GetFolder(sBaseProfilePath & "\appdata\Local")
set fFoldersAppDataLocalLow = objFS.GetFolder(sBaseProfilePath & "\appdata\LocalLow")
set fFoldersAppDataRoaming = objFS.GetFolder(sBaseProfilePath & "\appdata\Roaming")
set fFoldersFavorites = objFS.GetFolder(sBaseProfilePath & "\Favorites")
set fFoldersDownloads = objFS.GetFolder(sBaseProfilePath & "\Downloads")
set fFile = objFS.GetFile(sBaseProfilePath & "\ntuser.dat")
' wscript.echo "fDesktop: " & fDesktop.size
' wscript.echo "fFoldersAppDataRoaming: " & fFoldersAppDataRoaming.size
' wscript.echo "Local: " & EnumEstimateFolderWithIssues(sBaseProfilePath & "\appdata\Local")
' wscript.echo "LocalLow: " & fFoldersAppDataLocalLow.size
' wscript.echo "NTUser: " & fFile.size
wscript.echo sBaseProfilePath & vbtab & FormatNumber(fDesktop.size/1024,1) & vbtab & FormatNumber(fFoldersAppDataRoaming.size/1024/1024,1) & vbtab & FormatNumber(EnumEstimateFolderWithIssues(sBaseProfilePath & "\appdata\Local")/1024/1024,1) & vbtab & FormatNumber(fFoldersAppDataLocalLow.size/1024/1024,1) & vbtab & FormatNumber(fFile.size/1024/1024,1) & vbtab & (fFoldersFavorites.size) & vbtab & formatnumber(fFoldersDownloads.size/1024/1024,1) & vbtab & now
function EnumEstimateFolderWithIssues(sFolder)
iSize = 0
'wscript.echo sFolder
on error resume next
For Each objFolder In objFS.GetFolder(sFolder).subfolders 'sBaseProfilePath & "\appdata\Local").SubFolders
'wscript.echo " " & objFolder.name
For Each subfolder in objFolder.SubFolders
iSize =iSize+ subfolder.Size
Next
Next
EnumEstimateFolderWithIssues= iSize
end function
else
wscript.echo sBaseProfilePath & vbtab & -1 & vbtab & -1 & vbtab & -1 & vbtab & -1 & vbtab & -1 & vbtab & -1 & vbtab & -1 & vbtab & now
end if
Set objDir = nothing
set objFS = nothing
Else
wscript.echo "Need a base profile path"
end if