Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Write Computername to txt file

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,37575
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Write Computername to txt file
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Write Computername to txt file - 9/7/2006 11:52:47 PM   
  zwap

 

Posts: 10
Score: 0
Joined: 2/9/2006
Status: offline
What i want is:

a vbs script that write the computername into a text file and save it on a share file name:'computername.txt'  . I found a scrupt but i works not.

      

can you help?

Thanks in advance
 
 
Post #: 1
 
 RE: Write Computername to txt file - 9/8/2006 1:12:48 AM   
  mikeock


Posts: 124
Score: 1
Joined: 6/8/2006
Status: offline
the issue is quite simple


any line that has something like this: Set objFile = objFSO.OpenTextFile("C:\"computerName".txt", ForReading)
need to look like this Set objFile = objFSO.OpenTextFile("C:\" & computerName & ".txt", ForReading)

This will glue the quoted string and the variable together so that they are interpolated properly!

_____________________________

My sig sucks!

(in reply to zwap)
 
 
Post #: 2
 
 RE: Write Computername to txt file - 9/8/2006 2:05:09 AM   
  zwap

 

Posts: 10
Score: 0
Joined: 2/9/2006
Status: offline
Thanks man! it works great!!!

(in reply to mikeock)
 
 
Post #: 3
 
 RE: Write Computername to txt file - 9/8/2006 2:10:20 AM   
  zwap

 

Posts: 10
Score: 0
Joined: 2/9/2006
Status: offline
I have a new question:

I want a check if the value is 020 in a ini file on the third line:

      

it is located on C:\Program Files\Exact Software\bin\wupdate.ini

Can someone help me?

< Message edited by zwap -- 9/8/2006 2:12:21 AM >

(in reply to zwap)
 
 
Post #: 4
 
 RE: Write Computername to txt file - 9/8/2006 4:12:46 AM   
  DiGiTAL.SkReAM


Posts: 1139
Score: 6
Joined: 9/6/2005
From: Florida, USA
Status: offline

      



_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to zwap)
 
 
Post #: 5
 
 RE: Write Computername to txt file - 9/11/2006 7:38:51 PM   
  zwap

 

Posts: 10
Score: 0
Joined: 2/9/2006
Status: offline
Thanks!!!

Can Someone help me with this script.


This script looks if a file exitst and the he removes the Offline folder in the systemroot!

I get an error on line 47


      

Thanks in advance!!!!

(in reply to DiGiTAL.SkReAM)
 
 
Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Write Computername to txt file Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts