General information
Title:
Getting win95 domain/workgroup name for ANETRESOURCES()
How does someone find out the name of the workgroup or domain in windows 95-98-ME, or Windows 2000/XP? I understand that winnt and win9x handle this differently.
When I try to put a "" in the =ANETRESOURCES() domain section I only get fake placeholders of "Microsoft Windows Network" which it does not allow me to drill down into. Maybe if I could get the workgroup or domain name then I think this code will work.
From: Ed Johnson
***********************************************************
SET EXACT ON
searchfor = ""
accept "query what (blank=all - will hang on nonexisting domain!)" to searchfor
DO iteratenet WITH searchfor
WAIT WINDOW "all done!"
PROCEDURE iteratenet
PARAMETERS lookfor
? "searching for:", lookfor
LOCAL myres
DIMENSION myres(1)
myres(1)=""
LOCAL num
num = 0
num = ANETRESOURCES(myres,lookfor,0)
LOCAL i
i = 0
FOR i = 1 TO num
if(myres(i) != lookfor)
iteratenet(myres(i))
endif
ENDFOR
return
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only