Solved

VBScript

Posted on 2000-02-17
3
153 Views
Last Modified: 2008-03-17
Can you let me know what following lines doing?

set diskmb = ObjectManager.CreateExpression( " 'LogicalDisk.Free Megabytes;*.*' ")
set diskpct = ObjectManager.CreateExpression( " 'LogicalDisk.% Free Space;*.*' ")
0
Comment
Question by:leeann
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
troywillmot earned 50 total points
ID: 2532882
I've never seen quite that syntax, but it looks like its calling and object in another library (objectmanager) and asking it to call methods on another object (logicaldisk) and return objects from them.
Alternatively, it may be evaluating an expression where logicaldisk.free etc. are known variables (rather than it calling objects)

The objects returned are put into diskmb and diskpct.

With out more supporting code I can't quite tell what its pupose is, other than to return information about a disk or disks.
0
 
LVL 6

Expert Comment

by:Marine
ID: 2533097
It sets up a reference for you to LogicalDisk Object so you can do farther work with it. After you have it set up you then can use that object. I also didn't see this kind of a code before. Do you have a DLL library ? How do you create an instance of this object ? Do you have it referenced ? If not this may not work.
0
 
LVL 3

Expert Comment

by:troywillmot
ID: 2533124
If its in VBScript then there are no references, so thats not an issue so long as the objectmanager object is set to something using createobject, i.e

set objectmanager=createobject("prog.id")
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question