Windows Scripting
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationWindows Scripting

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 ASP Free Forums Sponsor:
  #1  
Old April 14th, 2007, 02:19 PM
Pr0FiT Pr0FiT is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 Pr0FiT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 52 m 32 sec
Reputation Power: 0
Super easy question of the day

So I know pretty close to zero about vb scripting just to give you some background ^_^

Okay I found this code in another post on this forum and it does exactly what I need it to except it echos the information instead of writing a line (for me this is going into a hta file). I was hoping you guys could help me out with the right syntax. I'm guessing it needs to use this .write thing I keep seeing but trying to guess at the syntax is producing all kinds of wacky errors. Any help is much appriecated.

Code:
<SCRIPT LANGUAGE="VBScript">
	Option Explicit

	Dim WSHShell
	Dim objNTInfo
	Dim GetComputerName

	Set objNTInfo = CreateObject("WinNTSystemInfo")
	GetComputerName = lcase(objNTInfo.ComputerName)
</SCRIPT>

Reply With Quote
  #2  
Old April 14th, 2007, 02:45 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,635 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1Folding Points: 373781 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 2 h 55 m 37 sec
Reputation Power: 1902
--moved to the Windows Scripting forum, although it might fit more in the HTML forum
since it's client side vbscript used as part of website.

anyway, in the code you posted there is nothing that echo anything.
whatever code that cause it is elsewhere.

Reply With Quote
  #3  
Old April 14th, 2007, 02:55 PM
Pr0FiT Pr0FiT is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 Pr0FiT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 52 m 32 sec
Reputation Power: 0
Here is the original code taken from the other thread

Code:
	Option Explicit

	Dim WSHShell
	Dim objNTInfo
	Dim GetComputerName

	Set objNTInfo = CreateObject("WinNTSystemInfo")
	GetComputerName = lcase(objNTInfo.ComputerName)

	Set WSHShell = WScript.CreateObject("WScript.Shell")
	WSHShell.Popup(GetComputerName)
	
	WScript.Quit

Reply With Quote
  #4  
Old April 14th, 2007, 06:14 PM
Nilpo's Avatar
Nilpo Nilpo is offline
ASP Free Beginner (1000 - 1499 posts)
 
Join Date: Jun 2006
Location: Salem, OH
Posts: 1,048 Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)Nilpo User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1Folding Points: 206875 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Days 12 h 32 m 33 sec
Reputation Power: 555
Send a message via ICQ to Nilpo Send a message via AIM to Nilpo Send a message via MSN to Nilpo Send a message via Yahoo to Nilpo Send a message via Google Talk to Nilpo Send a message via Skype to Nilpo
MySpace
That script gets the local machine and returns it in a basic message box.

It's seems to me that you want to write it into an HTML page. All you need do to is change write the variable back. Don't forget to include any html formatting...here's an example.

Code:
<script language="vbscript">
	Option Explicit

	Dim WSHShell
	Dim objNTInfo
	Dim GetComputerName

	Set objNTInfo = CreateObject("WinNTSystemInfo")
	GetComputerName = lcase(objNTInfo.ComputerName)
	Document.Write "<p>The computer name is <b>" & GetComputerName & "</b></p>"
</script>
This example would return something like this:

The computer name is computername

You might want to take a look at Microsoft's HTML Application Reference.
__________________
Click the image if at any point you don't like my decision.

Scripting problems? Windows questions? Ask the Windows Guru!


Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationWindows Scripting > Super easy question of the day


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT