2 * Copyright 2011 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #pragma makedep regtypelib
22 cpp_quote("#undef ExpandEnvironmentStrings")
25 helpstring("Windows Script Host Object Model"),
26 uuid(f935dc20-1cf0-11d0-adb9-00c04fd58a0b),
29 library IWshRuntimeLibrary
31 importlib("stdole2.tlb");
69 TristateUseDefault = -2,
74 interface IFolderCollection;
77 uuid(53bad8c1-e718-11cf-893d-00a0c9054228),
84 interface ITextStream : IDispatch {
86 HRESULT Line([out, retval] long* Line);
88 [id(0xfffffdef), propget]
89 HRESULT Column([out, retval] long* Column);
92 HRESULT AtEndOfStream([out, retval] VARIANT_BOOL* EOS);
95 HRESULT AtEndOfLine([out, retval] VARIANT_BOOL* EOL);
98 HRESULT Read([in] long Characters, [out, retval] BSTR* Text);
101 HRESULT ReadLine([out, retval] BSTR* Text);
104 HRESULT ReadAll([out, retval] BSTR* Text);
107 HRESULT Write([in] BSTR Text);
110 HRESULT WriteLine([in, defaultvalue("")] BSTR Text);
113 HRESULT WriteBlankLines([in] long Lines);
116 HRESULT Skip([in] long Characters);
126 uuid(c7c3f5a0-88a3-11d0-abcb-00a0c90fffc0),
133 interface IDrive : IDispatch {
134 [id(DISPID_VALUE), propget]
135 HRESULT Path([out, retval] BSTR* path);
137 [id(0x2710), propget]
138 HRESULT DriveLetter([out, retval] BSTR* letter);
140 [id(0x2711), propget]
141 HRESULT ShareName([out, retval] BSTR* ShareName);
143 [id(0x2712), propget]
144 HRESULT DriveType([out, retval] DriveTypeConst* type);
146 [id(0x2713), propget]
147 HRESULT RootFolder([out, retval] IFolder** folder);
149 [id(0x2715), propget]
150 HRESULT AvailableSpace([out, retval] VARIANT* Avail);
152 [id(0x2714), propget]
153 HRESULT FreeSpace([out, retval] VARIANT* pFree);
155 [id(0x2716), propget]
156 HRESULT TotalSize([out, retval] VARIANT* Total);
158 [id(0x2717), propget]
159 HRESULT VolumeName([out, retval] BSTR* Name);
161 [id(0x2717), propput]
162 HRESULT VolumeName([in] BSTR Name);
164 [id(0x2718), propget]
165 HRESULT FileSystem([out, retval] BSTR* pFileSystem);
167 [id(0x2719), propget]
168 HRESULT SerialNumber([out, retval] long* SerialNumber);
170 [id(0x271a), propget]
171 HRESULT IsReady([out, retval] VARIANT_BOOL* pfReady);
175 uuid(c7c3f5a4-88a3-11d0-abcb-00a0c90fffc0),
182 interface IFile : IDispatch {
183 [id(DISPID_VALUE), propget]
184 HRESULT Path([out, retval] BSTR* path);
186 [id(0x03e8), propget]
187 HRESULT Name([out, retval] BSTR* Name);
189 [id(0x03e8), propput]
190 HRESULT Name([in] BSTR Name);
192 [id(0x03ea), propget]
193 HRESULT ShortPath([out, retval] BSTR* path);
195 [id(0x03e9), propget]
196 HRESULT ShortName([out, retval] BSTR* Name);
198 [id(0x03ec), propget]
199 HRESULT Drive([out, retval] IDrive** drive);
201 [id(0x03ed), propget]
202 HRESULT ParentFolder([out, retval] IFolder** folder);
204 [id(0x03eb), propget]
205 HRESULT Attributes([out, retval] FileAttribute* attr);
207 [id(0x03eb), propput]
208 HRESULT Attributes([in] FileAttribute attr);
210 [id(0x03ee), propget]
211 HRESULT DateCreated([out, retval] DATE* date);
213 [id(0x03ef), propget]
214 HRESULT DateLastModified([out, retval] DATE* date);
216 [id(0x03f0), propget]
217 HRESULT DateLastAccessed([out, retval] DATE* date);
219 [id(0x03f1), propget]
220 HRESULT Size([out, retval] VARIANT* Size);
222 [id(0x03f2), propget]
223 HRESULT Type([out, retval] BSTR* Type);
226 HRESULT Delete([in, defaultvalue(0)] VARIANT_BOOL Force);
230 [in] BSTR Destination,
231 [in, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
234 HRESULT Move([in] BSTR Destination);
237 HRESULT OpenAsTextStream(
238 [in, defaultvalue(1)] IOMode IOMode,
239 [in, defaultvalue(0)] Tristate Format,
240 [out, retval] ITextStream** ppts);
244 uuid(c7c3f5a5-88a3-11d0-abcb-00a0c90fffc0),
251 interface IFileCollection : IDispatch {
252 [id(DISPID_VALUE), propget]
255 [out, retval] IFile** ppfile);
256 [id(DISPID_NEWENUM), propget, restricted, hidden]
257 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
259 HRESULT Count([out, retval] long* count);
263 uuid(c7c3f5a2-88a3-11d0-abcb-00a0c90fffc0),
270 interface IFolder : IDispatch {
271 [id(DISPID_VALUE), propget]
272 HRESULT Path([out, retval] BSTR* path);
274 [id(0x03e8), propget]
275 HRESULT Name([out, retval] BSTR* name);
277 [id(0x03e8), propput]
278 HRESULT Name([in] BSTR name);
280 [id(0x03ea), propget]
281 HRESULT ShortPath([out, retval] BSTR* path);
283 [id(0x03e9), propget]
284 HRESULT ShortName([out, retval] BSTR* name);
286 [id(0x03ec), propget]
287 HRESULT Drive([out, retval] IDrive** drive);
289 [id(0x03ed), propget]
290 HRESULT ParentFolder([out, retval] IFolder** folder);
292 [id(0x03eb), propget]
293 HRESULT Attributes([out, retval] FileAttribute* attr);
295 [id(0x03eb), propput]
296 HRESULT Attributes([in] FileAttribute attr);
298 [id(0x03ee), propget]
299 HRESULT DateCreated([out, retval] DATE* date);
301 [id(0x03ef), propget]
302 HRESULT DateLastModified([out, retval] DATE* date);
304 [id(0x03f0), propget]
305 HRESULT DateLastAccessed([out, retval] DATE* date);
307 [id(0x03f2), propget]
308 HRESULT Type([out, retval] BSTR* type);
311 HRESULT Delete([in, defaultvalue(0)] VARIANT_BOOL force);
315 [in] BSTR Destination,
316 [in, defaultvalue(-1)] VARIANT_BOOL OverWriteFiles);
319 HRESULT Move([in] BSTR Destination);
321 [id(0x2710), propget]
322 HRESULT IsRootFolder([out, retval] VARIANT_BOOL* root);
324 [id(0x03f1), propget]
325 HRESULT Size([out, retval] VARIANT* size);
327 [id(0x2711), propget]
328 HRESULT SubFolders([out, retval] IFolderCollection** folders);
330 [id(0x2712), propget]
331 HRESULT Files([out, retval] IFileCollection** files);
334 HRESULT CreateTextFile(
336 [in, defaultvalue(-1)] VARIANT_BOOL Overwrite,
337 [in, defaultvalue(0)] VARIANT_BOOL Unicode,
338 [out, retval] ITextStream** ppts);
342 uuid(c7c3f5a3-88a3-11d0-abcb-00a0c90fffc0),
349 interface IFolderCollection : IDispatch {
353 [out, retval] IFolder** folder);
355 [id(DISPID_VALUE), propget]
358 [out, retval] IFolder** folder);
360 [id(DISPID_NEWENUM), propget, restricted, hidden]
361 HRESULT _NewEnum([out, retval] IUnknown** ppenum);
364 HRESULT Count([out, retval] long* count);
368 uuid(f935dc27-1cf0-11d0-adb9-00c04fd58a0b),
373 interface IWshCollection : IDispatch {
377 [out, retval] VARIANT *out_Value);
380 HRESULT Count([out, retval] long *out_Count);
383 HRESULT length([out, retval] long *out_Count);
386 HRESULT _NewEnum([out, retval] IUnknown **out_Enum);
390 uuid(f935dc29-1cf0-11d0-adb9-00c04fd58a0b),
395 interface IWshEnvironment : IDispatch {
396 [id(DISPID_VALUE), propget]
399 [out, retval] BSTR *out_Value);
401 [id(DISPID_VALUE), propput]
407 HRESULT Count([out, retval] long *out_Count);
410 HRESULT length([out, retval] long *out_Count);
413 HRESULT _NewEnum([out, retval] IUnknown **out_Enum);
416 HRESULT Remove([in] BSTR Name);
420 uuid(08fed190-be19-11d3-a28b-00104bd35090),
425 interface IWshExec : IDispatch {
426 [id(0x0001), propget]
427 HRESULT Status([out, retval] WshExecStatus* Status);
429 [id(0x0003), propget]
430 HRESULT StdIn([out, retval] ITextStream** stream);
432 [id(0x0004), propget]
433 HRESULT StdOut([out, retval] ITextStream** stream);
435 [id(0x0005), propget]
436 HRESULT StdErr([out, retval] ITextStream** stream);
438 [id(0x0006), propget]
439 HRESULT ProcessID([out, retval] DWORD *pid);
441 [id(0x0007), propget]
442 HRESULT ExitCode([out, retval] DWORD *code);
449 uuid(f935dc23-1cf0-11d0-adb9-00c04fd58a0b),
454 interface IWshShortcut : IDispatch {
455 [id(DISPID_VALUE), propget]
456 HRESULT FullName([out, retval] BSTR* name);
458 [id(0x03e8), propget]
459 HRESULT Arguments([out, retval] BSTR* Arguments);
461 [id(0x03e8), propput]
462 HRESULT Arguments([in] BSTR Arguments);
464 [id(0x03e9), propget]
465 HRESULT Description([out, retval] BSTR* Description);
467 [id(0x03e9), propput]
468 HRESULT Description([in] BSTR Description);
470 [id(0x03ea), propget]
471 HRESULT Hotkey([out, retval] BSTR* HotKey);
473 [id(0x03ea), propput]
474 HRESULT Hotkey([in] BSTR HotKey);
476 [id(0x03eb), propget]
477 HRESULT IconLocation([out, retval] BSTR* IconPath);
479 [id(0x03eb), propput]
480 HRESULT IconLocation([in] BSTR IconPath);
482 [id(0x03ec), propput]
483 HRESULT RelativePath([in] BSTR rhs);
485 [id(0x03ed), propget]
486 HRESULT TargetPath([out, retval] BSTR* Path);
488 [id(0x03ed), propput]
489 HRESULT TargetPath([in] BSTR Path);
491 [id(0x03ee), propget]
492 HRESULT WindowStyle([out, retval] int* ShowCmd);
494 [id(0x03ee), propput]
495 HRESULT WindowStyle([in] int ShowCmd);
497 [id(0x03ef), propget]
498 HRESULT WorkingDirectory([out, retval] BSTR* WorkingDirectory);
500 [id(0x03ef), propput]
501 HRESULT WorkingDirectory([in] BSTR WorkingDirectory);
504 HRESULT Load([in] BSTR PathLink);
511 uuid(f935dc21-1cf0-11d0-adb9-00c04fd58a0b),
517 interface IWshShell : IDispatch {
518 [id(0x0064), propget]
519 HRESULT SpecialFolders([out, retval] IWshCollection** out_Folders);
521 [id(0x00c8), propget]
523 [in, optional] VARIANT* Type,
524 [out, retval] IWshEnvironment** out_Env);
529 [in, optional] VARIANT* WindowStyle,
530 [in, optional] VARIANT* WaitOnReturn,
531 [out, retval] DWORD* out_ExitCode);
536 [in, optional] VARIANT* SecondsToWait,
537 [in, optional] VARIANT* Title,
538 [in, optional] VARIANT* Type,
539 [out, retval] int* out_Button);
542 HRESULT CreateShortcut(
544 [out, retval] IDispatch** out_Shortcut);
547 HRESULT ExpandEnvironmentStrings(
549 [out, retval] BSTR* out_Dst);
554 [out, retval] VARIANT* out_Value);
560 [in, optional] VARIANT* Type);
563 HRESULT RegDelete([in] BSTR Name);
567 uuid(24be5a30-edfe-11d2-b933-00104b365c9f),
573 interface IWshShell2 : IWshShell {
578 [in, defaultvalue("")] BSTR Target,
579 [out, retval] VARIANT_BOOL* out_Success);
584 [in, optional] VARIANT* Wait,
585 [out, retval] VARIANT_BOOL* out_Success);
590 [in, optional] VARIANT* Wait);
594 uuid(41904400-be18-11d3-a28b-00104bd35090),
599 interface IWshShell3 : IWshShell2 {
603 [out, retval] IWshExec** out_Exec);
605 [id(0x0bc5), propget]
606 HRESULT CurrentDirectory([out, retval] BSTR* out_Directory);
608 [id(0x0bc5), propput]
609 HRESULT CurrentDirectory([in] BSTR out_Directory);
613 uuid(24be5a31-edfe-11d2-b933-00104b365c9f),
618 interface IWshNetwork2 : IDispatch {
619 [id(0x60020000), propget]
620 HRESULT UserDomain([out, retval] BSTR *out_UserDomain);
624 helpstring("Windows Script Host Shell Object"),
625 uuid(f935dc22-1cf0-11d0-adb9-00c04fd58a0b),
626 threading(apartment),
627 progid("WScript.Shell.1"),
628 vi_progid("WScript.Shell")
630 coclass IWshShell_Class {
631 [default] interface IWshShell3;
635 helpstring("Windows Script Host Shell Object"),
636 uuid(72c24dd5-d70a-438b-8a42-98424b88afb8),
637 threading(apartment),
638 progid("WScript.Shell.1"),
639 vi_progid("WScript.Shell")
642 [default] interface IWshShell3;
646 helpstring("Windows Script Host Network Object"),
647 uuid(f935dc26-1cf0-11d0-adb9-00c04fd58a0b),
648 threading(apartment),
649 progid("WScript.Network.1"),
650 vi_progid("WScript.Network")
652 coclass IWshNetwork_Class {
653 [default] interface IWshNetwork2;
657 helpstring("Windows Script Host Network Object"),
658 uuid(093ff999-1ea0-4079-9525-9614c3504b74),
659 threading(apartment),
660 progid("WScript.Network.1"),
661 vi_progid("WScript.Network")
664 [default] interface IWshNetwork2;
668 uuid(08fed191-be19-11d3-a28b-00104bd35090),
672 [default] interface IWshExec;