I run this as part of my netlogon
as in;
cscript \\<server>\netlogon\<scriptname>.vbs
dim wshShell, fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
DeleteDesktopIniFiles
Sub DeleteDesktopIniFiles
Dim strStartUp, strStartMenu, fldr
strStartUp = wshShell.SpecialFolders("startup")
strStartMenu = wshShell.SpecialFolders("StartMenu")
if fso.fileexists( strStartUp & "\desktop.ini" ) then fso.deletefile strStartUp & "\desktop.ini"
if fso.fileexists( strStartMenu & "\desktop.ini" ) then fso.deletefile strStartMenu & "\desktop.ini"
For Each fldr in fso.getFolder( strStartMenu ).subFolders
DeleteDesktopIniFilesInSubFolder fldr.ShortPath
Next
End Sub
Sub DeleteDesktopIniFilesInSubFolder( strPath )
Dim fldr, f
For Each fldr in fso.getFolder( strPath ).subFolders
DeleteDesktopIniFilesInSubFolder fldr.ShortPath
Next
For Each f in fso.getFolder( strPath ).Files
if lcase( f.name ) = "desktop.ini" then f.delete
Next
End Sub