Sign in to follow this  
Followers 0
jim568

Script Error

6 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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 ?


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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 .. :)


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0