'*** SET VARIABLES *** set fso = createobject("scripting.filesystemobject") Set WSHShell = WScript.CreateObject("WScript.Shell") uname = "U_" & replace(wshshell.expandenvironmentstrings ("%USERNAME%"), "_", "x_") & "_" computername= "M_" & replace(wshshell.expandenvironmentstrings ("%COMPUTERNAME%"), "_", "x_") & "_" LockFilename = "\\servername\SingleLogin\"&uname&"-user---comp-"&computername&".lck" if fso.FileExists (LockFilename) then fso.DeleteFile (LockFilename) end if wscript.quit