Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb Site ManagementScripts

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 13th, 2009, 12:25 AM
nakshathra nakshathra is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2009
Posts: 4 nakshathra User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 30 m 6 sec
Reputation Power: 0
How to use Getobject in vbscript?

Hi,

I want to get my system details using vbscript. The following code is working fine in server but when i place this is my desktop its not working. Its show the error as " ActiveX component can't create object: Getobject"

Code:

<html>
<script language="vbscript">

Function test1(ipaddres)

answer=MsgBox("Hello everyone, System is writing, Your System level Details!",65,"Example")

Dim filename
filename="c:\Program Files\softwaretest.txt"
		   
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.CreateTextFile(filename, True)

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
		
				
Set colSoftware = objWMIService.ExecQuery _
("Select * from Win32_Product")

For Each objSoftware in colSoftware
objTextFile.WriteLine objSoftware.Caption & vbtab & "||" & vbtab & _
objSoftware.Version & vbtab & "~~"
Next
objTextFile.Close

End Function

</script>
<body bgcolor='lightyellow'>
<input type=button value='check' onclick='test1(111)'>
</body>
</html>




Many thanks...

Reply With Quote
  #2  
Old July 30th, 2009, 12:22 AM
sydsunman sydsunman is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Location: Australia
Posts: 1 sydsunman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 56 sec
Reputation Power: 0
Quote:
Originally Posted by nakshathra
Hi,

I want to get my system details using vbscript. The following code is working fine in server but when i place this is my desktop its not working. Its show the error as " ActiveX component can't create object: Getobject"



Did you manage to find any answer or workaround?. I am having similar issue

ActiveX component can't create object: 'GetObject' when i try to get User object from LDAP to query the property.

Thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > How to use Getobject in vbscript?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap