Option Explicit If WScript.Arguments.count <> 2 Then MsgBox "Usage: delftpuser.vbs " WScript.Quit(0) End If Dim configLocation, username, password, homedir configLocation = WScript.Arguments(0) username = WScript.Arguments(1) Dim fso, configFile, config, startUser, endUser configLocation = configLocation & "/FileZilla Server.xml" ' Read Config Set fso = CreateObject("Scripting.FileSystemObject") Set configFile = fso.OpenTextFile(configLocation, 1, False) config = configFile.ReadAll configFile.Close Set configFile = Nothing ' Delete User startUser = InStr(config, "") If startUser = 0 Then WScript.Quit(1) End If endUser = InStr(startUser, config, "") config = Left(config, startUser - 1) + Right(config, Len(config) - endUser - 8) ' Write New Config Set configFile = fso.OpenTextFile(configLocation, 2, False) configFile.Write config configFile.Close Set configFile = Nothing ' Force FileZilla to reload config Dim exec, wshShell, oExec exec = Replace(configLocation, "FileZilla Server.xml", "FileZilla server.exe") exec = """" + exec + """" + " /reload-config" set wshshell = nothing