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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Collection Via USER INPUT

Status
Not open for further replies.

Lqqker777

IS-IT--Management
Apr 16, 2007
10
US
I need to collect data from users as they login to their system...

The type of data that I am after is the ASSET TAG NUMBER that is attached to the case of the system. I need the user to type in the asset number (Example - 01881) into a GUI popup, then it be recorded to a text file or entered into the registry for later collection. Once a user has entered this information the popup disappears and never request this info again. HOWEVER if a new user logins to the system the popup needs to return requesting the data once showing the new user on this asset.

Is this something that can be done, I have searched for DAYS and DAYS for this exact method of data collection and with no luck in finding it.

Mark aka Lqqker777
 
Hi and welcome to Tek-Tips. Read faq222-2244 to see how to get the best from these forums.

When user logs in use GetSetting (see VBHelp) to find if this user has a key in registry for this app. If not open a dialog and get asset number. Use SaveSetting to write this user/asset number pair to registry.

For more sophisticated control over your registry you can use the registry API. See for examples and code

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
OK I got it the way I want it to work, NOW! hehehe always a BUT or NOW...

I need the script to run if the string doesnt exist but if it does to not run. I have tried all day using registrykeyexist with no luck, any thoughts?
 
Heres the script so far:

Dim sh, v, r
Set sh = WScript.CreateObject("WScript.Shell")

v = Msgbox("Enter Asset Tag Number")
If v = 2 Then
wscript.quit
End if
r = inputbox("ASSET NUMBER")
If r = "empty" Then
sh.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AbbottAsset\Comment", "", "REG_SZ"

Else

sh.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AbbottAsset\Comment", "", "REG_SZ"
sh.regwrite "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\AbbottAsset\Comment", r, "REG_SZ"

End if
msgbox "Asset Tag Information has been entered, Thank You!" ,0, "Finished"

 
I guess you didn't have time to read the faq I pointed out to you - if you had you would discover that this is the VB6 forum, so your answer was a VB6 answer. If you are dealing with VBScript (rather different) then try forum329

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Sorry, now I understand what it was you were trying to say... I have been reading till my eyes have gone crosseyed. I actually thought I was in the right forum, somehow I missed I was in Vb5/6.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top