>>How do I know what 'myDomain' & 'myUser' are?
>>
>>Thanks
>
>The domain parameter can also be a machine name, so for a stand-alone Sys(0) should give both out. The machine name is before the "#" and user is after.
>
>Otherwise you can use this API call for the user name: GetUserName (
http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~2,31,Forum=0,18,13).
>
>I haven't had a need to extract a domain, but there should be a way to do this with ADSI or an API call. If this program will run on a known domain, you can always hard-code that in.
To get the domain you might want to try GETENV("userdomain").
Roger
Aremaitch Consulting