Jump to content

Script Error


jim568
 Share

Recommended Posts

Can some analyze this script?

Keep getting invalid character

And I do not know anything about scripting cod

The file suppose to get OEM /bios info for identification

running winxp sp2 on intel G31 chipset

Thanks

Jim

VB Code for WMI Branding:

$wbemFlagReturnImmediately = 0x10

$wbemFlagForwardOnly = 0x20

$colItems = ""

$strComputer = "localhost"

$computerModel = "";Store computer model retreived.

$machineType = "";Brand either Desktop or Laptop.

$wksIDValue = ""; Model Branding.

$enhancedMachine = "";Branding for Multimedia Machine.

$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")

$colItems = $objWMIService.ExecQuery ("SELECT * FROM Win32_ComputerSystem", "WQL", _

$wbemFlagReturnImmediately + $wbemFlagForwardOnly)

;Search for Model from Win32_ComputerSystem

If IsObj($colItems) Then

For $objItem In $colItems

$computerModel = $objItem.Model

Next

EndIf

Link to comment
Share on other sites

works fine on my pc ...

what is the exact error you get and on which line ?

thanks for reply

when i do run script nothing happends no out put

when i use scite to run script

i get following

Microsoft ® Windows Script Host Version 5.7

Copyright © Microsoft Corporation. All rights reserved.

C:\Documents and Settings\admin\Desktop\test.vbs(1, 1) Microsoft VBScript compilation error: Invalid character

>Exit code: 1 Time: 0.216

Link to comment
Share on other sites

  • Developers

thanks for reply

when i do run script nothing happends no out put

when i use scite to run script

i get following

Microsoft ® Windows Script Host Version 5.7

Copyright © Microsoft Corporation. All rights reserved.

C:\Documents and Settings\admin\Desktop\test.vbs(1, 1) Microsoft VBScript compilation error: Invalid character

>Exit code: 1 Time: 0.216

I hope you name the file Something.au3 not test.vbs ... :)

The script doesn't contain any "output" function, so what is it you want to do with the result ? MsgBox() or something ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I hope you name the file Something.au3 not test.vbs ... :)

The script doesn't contain any "output" function, so what is it you want to do with the result ? MsgBox() or something ?

no i copy it test to see the result

just wanted to view the result

how do you use msgbox to see the result ?

thanks

Link to comment
Share on other sites

  • Developers

no i copy it test to see the result

just wanted to view the result

how do you use msgbox to see the result ?

thanks

The Error shown says test.vbs but autoit3scripts use au3 so the filename needs to be something like test.au3.

To find info about MsgBox() you just need to open the helpfile ... Hit F1 to open it .. :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...