Hello,
For the 1st way mentioned above, you need to have Sharepoint Portal servive installed (this is different from Windows Sharepoint services -> previously called as Sharepoint Team Services [STS]). When they say "the name of your SharePoint Portal Server 2003 instance" they mean where you have Sharepoint Portal server installed. Or in other words if you want to go to the home page of your Sharepoint server, the link that is used like
http://system2/sitesThe second option is one that we have used a lot of times - System.Environment.UserName and it has worked very well for us.
Shanthi
InfoPathDev India