'ManageEngine Desktop Central Agent '----------------------------------- 'Script to check a folder exists or not . 'If the folder is already exists then the return code will be 1638 [Another version is installed] else 0 '============================================================================================= path = WScript.Arguments.Item(0) set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FolderExists(path) = true then exitCode = 1638 Else exitCode = 0 End If Wscript.Quit exitCode