Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 10:57 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: motherboard number with opus script?
PostPosted: May 14th, 2011, 4:55 pm 
Offline

Joined: September 29th, 2006, 3:12 am
Posts: 39
hi

does any one know how to get motherboard number from an opus script?
maybe this one?

-------------
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")
For Each objItem in colItems
Wscript.Echo objItem.SerialNumber
exit for
Next
------------

if yes , how I can insert it in an opus script? this script is too advanced for me
thanks


For this message sherif has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: motherboard number with opus script?
PostPosted: May 16th, 2011, 9:04 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
That isn't OpusScript - it's VBScript. I'm not sure if you're simply trying to drop that code directly into Opus, but if so, you can! Also the code doesn't work:

Create a VBS file and use:
Code:
strServer = "."

Set objWMI = GetObject("winmgmts://" & strServer & "/root\cimv2")
Set objInstances = objWMI.InstancesOf("Win32_BaseBoard",48)

On Error Resume Next
For Each objInstance in objInstances
    With objInstance
        WScript.Echo .SerialNumber
    End With
On Error Goto 0
Next


However, you'll need to either run it from a command prompt and output to text or add a write to file feature into the script to get the serial number into a text file which can then be read by Opus.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: motherboard number with opus script?
PostPosted: May 16th, 2011, 6:30 pm 
Offline

Joined: September 29th, 2006, 3:12 am
Posts: 39
yes , thanks, it works great, and it is precise,...but still I don't know to write the numeric result somewhere so after opus can read it.
:D :oops:


For this message sherif has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: motherboard number with opus script?
PostPosted: May 18th, 2011, 10:40 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
As I said above, you need to change the script to write to a text file rather than echo to screen. I also believe you can run this from command prompt and the echo will automatically write to the specified file. Whether this can be configured for Opus' launch action is another matter.

I don't program in VBScript, though I doubt it's difficult and I'm sure a quick google will throw up examples.

I'd image, that if you'd take the time to add a profile, then people will be more inclined to post specific Opus answers.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: motherboard number with opus script?
PostPosted: May 18th, 2011, 1:17 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi sherif,

Would it be possible for you to use server-side database storage for your motherboard data? If so, then you can use the post-web-data-action in Opus to connect with an ASP page (which can hold your VB script) or with a PHP page, which can insert/retrieve your data from a server side DB. If you need help with the VB script and ASP page, try this forum:

http://aspmessageboard.com/forumdisplay.php?f=4

Hope this helps.

Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group