diff --git a/programs/wscript/host.c b/programs/wscript/host.c index 9634100fb8..302165673c 100644 --- a/programs/wscript/host.c +++ b/programs/wscript/host.c @@ -29,6 +29,8 @@ #include +static const WCHAR wshNameW[] = {'W','i','n','d','o','w','s',' ','S','c','r','i','p','t',' ','H','o','s','t',0}; + WINE_DEFAULT_DEBUG_CHANNEL(wscript); static HRESULT WINAPI Host_QueryInterface(IHost *iface, REFIID riid, void **ppv) @@ -94,8 +96,11 @@ static HRESULT WINAPI Host_Invoke(IHost *iface, DISPID dispIdMember, REFIID riid static HRESULT WINAPI Host_get_Name(IHost *iface, BSTR *out_Name) { - WINE_FIXME("(%p)\n", out_Name); - return E_NOTIMPL; + WINE_TRACE("(%p)\n", out_Name); + + if(!(*out_Name = SysAllocString(wshNameW))) + return E_OUTOFMEMORY; + return S_OK; } static HRESULT WINAPI Host_get_Application(IHost *iface, IDispatch **out_Dispatch) diff --git a/programs/wscript/tests/run.js b/programs/wscript/tests/run.js index 809fa2f7f9..84d7789a47 100644 --- a/programs/wscript/tests/run.js +++ b/programs/wscript/tests/run.js @@ -25,5 +25,6 @@ function ok(expr, msg) { ok(typeof(WScript) === "object", "typeof(WScript) = " + typeof(WScript)); ok(typeof(WSH) === "object", "typeof(WSH) = " + typeof(WSH)); ok(WScript === WSH, "WScript !== WSH"); +ok(WScript.Name === "Windows Script Host", "WScript.Name = " + WScript.Name); winetest.reportSuccess();