How Can I get the following from a computer using VB6? domain, user id, machine name, machine IP any APIs I can use?
For UserID and Machine name, see the "API" section of our Classic VB FAQs (in the FAQ forum, which is shown near the top of our home page) For the others, I would recommend a search of the API forum, or this one.
(Microsoft MVP from July 2007 to June 2017) . . . . . . . . . . Hitchhiker's Guide to Getting Help at VBForums Database Development FAQs/Tutorials (updated May 2011) (includes fixing common DB related errors, and [VB.Net] ADO.Net Tutorial, and [Classic VB] ADO tutorial /further steps) other useful DB bits: . Connection strings (alternative copy).•. MDAC/Jet/ACE downloads .•. SQL Server downloads . Classic VB FAQs (updated Oct 2010) (includes fixing common VB errors) some of my Classic VB bits: . Tutorial: How to automate Excel from VB6 (or VB5/VBA) .•. SQL 'Select' statement formatter/checker .•. Convert colour number to colour name .•. FlexGrid: fill from recordset .•. FlexGrid: AutoSize columns .•. DB Reserved Words checker .
Oh never mind... I got it through... Code: domain = Environ("USERDOMAIN") userId = Environ("USERNAME") machineName = Environ("COMPUTERNAME") and IpAddress through the code here
domain = Environ("USERDOMAIN") userId = Environ("USERNAME") machineName = Environ("COMPUTERNAME")
While simple, Environ is not a particularly good idea - it can be edited by the user or other programs, so may not actually have the right info.
The use for this app I'm making is well simple I suppose. So I'll definitely come back here if the user comes back and says some data was changed.
Forum Rules