Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stealing Win Logon varabile and saving as a text file

Status
Not open for further replies.

Lseveron

Technical User
Feb 4, 2002
4
AU
Hiya,

Currently I need to match up thousands of student logon's with a rather long magnetic number, what I was hoping to do is create a web page where the students can goto from there pc and swipe there ID cards through the system and saving this information to a *.txt file

Eg. Bbloggs 2313434234534456456=2342
(Username) (Magnetic number)

I really need to make it run of some sort of varable as if the student logon is entered inncorrectly it wil ruin what I am trying to do, Unfortantly my understanding here is limited and any help would be hugely appreciated with both the varable and the saving to a text file


Cheers

Lseveron

 
To get userLogin :
Code:
Dim WshNetwork, userLoginName
Set WshNetwork	= CreateObject("WScript.Network")
userLoginName = WshNetwork.UserName
To write to a file :
Code:
Dim Fso, TextFile
Set Fso = CreateObject("Scripting.FileSystemObject")
set TextFile = Fso.OpenTextFile("C:\test.txt", 8, True)
TextFile.WriteLine "USER LOGIN NAME = " & userLoginName
Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top