Page 1 of 1 1
Topic Options
#133057 - 2005-01-27 10:43 AM Kixomatic vs Scriptomatic
Anonymous
Unregistered


First of all the BB tells me i'm logged on but I can only create a post as a Guest....


The output of Kixomatic differs with the output of Scriptomatic.

Think it is caused by the following difference in code:

Kix:
Code:
$strComputer = "."
$objWMIService = GetObject("winmgmts:\\" + $strComputer + "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_PageFile" ,,48 )
...



VBS:
Code:
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_PageFile", "WQL",wbemFlagReturnImmediately + wbemFlagForwardOnly)
...




Output Kix:
Code:

AccessMask:
Archive: -1
Caption: d:\pagefile.sys
Compressed: 0
CompressionMethod:
CreationClassName: CIM_LogicalFile
CreationDate: 20030519153632.421875+120
CSCreationClassName: Win32_ComputerSystem
CSName: computername
Description: d:\pagefile.sys
Drive: d:
EightDotThreeFileName: d:\pagefile.sys
Encrypted: 0
EncryptionMethod:
Extension: sys
FileName: pagefile
FileSize: 401743872
FileType: System file
FreeSpace:
FSCreationClassName: Win32_FileSystem
FSName: NTFS
Hidden: -1
InitialSize: 0
InstallDate: 20030519153632.421875+120
InUseCount:
LastAccessed: 20050121162501.468750+060
LastModified: 20050121162501.468750+060
Manufacturer:
MaximumSize: 0
Name: D:\pagefile.sys
Path: \
Readable: -1
Status: OK
System: -1
Version:
Writeable: -1



Output VBS:
Code:

AccessMask:
Archive: True
Caption: d:\pagefile.sys
Compressed: False
CompressionMethod:
CreationClassName: CIM_LogicalFile

CreationDate: 19-05-2003 15:36:32
CSCreationClassName: Win32_ComputerSystem
CSName: SASX00111
Description: d:\pagefile.sys
Drive: d:
EightDotThreeFileName: d:\pagefile.sys
Encrypted: False
EncryptionMethod:
Extension: sys
FileName: pagefile
FileSize: 401743872
FileType: System file
FreeSpace:
FSCreationClassName: Win32_FileSystem
FSName: NTFS
Hidden: True
InitialSize: 0

InstallDate: 19-05-2003 15:36:32
InUseCount:

LastAccessed: 21-01-2005 16:25:01

LastModified: 21-01-2005 16:25:01
Manufacturer:
MaximumSize: 0
Name: D:\pagefile.sys
Path: \
Readable: True
Status: OK
System: True
Version:
Writeable: True



Any Idea what I have to change in Kix to have the same output as with VBS....

Thanks in Advance

Co

Top
#133058 - 2005-01-27 02:33 PM Re: Kixomatic vs Scriptomatic
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
Well in kix -1 evaluates to true and 0 evaluates to false, so i'm not sure if you can consider those 'different'.

And the kix code doesn't seem to convert the wmi date, but it can be done with WMIDate

And did the kix code actually return 'computername' for CSName?
_________________________
Eric

Top
#133059 - 2005-01-27 03:24 PM Re: Kixomatic vs Scriptomatic
Anonymous
Unregistered


VB "True" Statement



Top
#133060 - 2005-01-27 04:24 PM Re: Kixomatic vs Scriptomatic
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
KiXomatic was based (when I say based, I really mean stolen) from the original Scriptomatic 1.0. It really isn't a fair comparison to compare KiXomatic to Scriptomatic 2.0 at this point.

Oh, and the 48 has nothing to do with it. I'd explain it again, but I've done so a couple of times already. You can find the answer if you search the board.

Top
#133061 - 2005-01-27 10:01 PM Re: Kixomatic vs Scriptomatic
Anonymous
Unregistered


Thanks for the comment. I think I have to do something like Shawn said in the above link.

Cobus

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 363 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.051 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org