Using WScript in wsc files 
Author Message
 Using WScript in wsc files

I want to use my JScript tools in a wsc-file.
I have only one problem: using
var fso = WScript.CreateObject
("Scripting.FileSystemObject");
does not work.

The error "WScript" is undefines is prompted.
How can I create a file system object using the wsh and
JScript?

My used code is in the attachment.

Thank you for the help,

Frank

  sample.zip
1K Download


Fri, 01 Jul 2005 18:35:52 GMT  
 Using WScript in wsc files

in Jscript its:
var fso = new ActiveXObject("Scripting.FileSystemObject");


Quote:
> I want to use my JScript tools in a wsc-file.
> I have only one problem: using
> var fso = WScript.CreateObject
> ("Scripting.FileSystemObject");
> does not work.

> The error "WScript" is undefines is prompted.
> How can I create a file system object using the wsh and
> JScript?

> My used code is in the attachment.

> Thank you for the help,

> Frank



Fri, 01 Jul 2005 23:35:24 GMT  
 Using WScript in wsc files

Thanks for the fast help!!

Is there a documentation available, which syntax to use
in wsc-files? Online or Book?

Frank Mueller

Quote:
>-----Original Message-----
>in Jscript its:
>var fso = new ActiveXObject

("Scripting.FileSystemObject");
Quote:



>> I want to use my JScript tools in a wsc-file.
>> I have only one problem: using
>> var fso = WScript.CreateObject
>> ("Scripting.FileSystemObject");
>> does not work.

>> The error "WScript" is undefines is prompted.
>> How can I create a file system object using the wsh and
>> JScript?

>> My used code is in the attachment.

>> Thank you for the help,

>> Frank

>.



Sat, 02 Jul 2005 00:17:57 GMT  
 Using WScript in wsc files

Quote:

> Is there a documentation available, which syntax to use
> in wsc-files? Online or Book?

You might find something here:

Windows Script Components
http://msdn.microsoft.com/library/en-us/script56/html/lettitle.asp

--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and a ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter



Sat, 02 Jul 2005 00:37:24 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Using WScript object in WSC components

2. Using Wscript Objects in WSC

3. Using WSCRIPT object in a WSC

4. Using WSC files from ASP (VBScript)

5. Using WScrip.Echo in a WSC file....?

6. Using WSC files from ASP (VBScript)

7. No WScript object in WSC's?

8. How to use wscript methods in .wsc components?

9. WScript automatically instatiated in WSC?

10. WScript.Run from HTA using vbscript: File not found

11. Problems using WScript to execute a batch file

12. How to use JScript file (using WScript object) inside HTML codeWScript

 

 
Powered by phpBB® Forum Software