Probably the easiest way is to query the registry and grab it from there. It looks like Hkey_Current_User\Volatile Environment has an "APPDATA" value that will get you in the ballpark.
------------------------------------------------------ Roger D. Seielstad - MCSE Sr. Systems Administrator Inovis - Formerly Harbinger and Extricity Atlanta, GA > -----Original Message----- > From: Morgan, Joshua [mailto:JMorgan@;SCSDB.k12.sc.us] > Sent: Tuesday, October 22, 2002 3:21 PM > To: '[EMAIL PROTECTED]' > Subject: [ActiveDir] OT: My Documents > > > I'm trying to write some scripts for my Windows 98 and > Windows 95 users to > copy their My Documents Directory to a network share. > > Question is there a way to call the My Documents directory > without knowing > the path? > Example %computername% calls the local computer name > %username% calls the current user > > Is there an example like this for the My Documents directory > If not is there a way to set it programmatically > > > > > > Joshua Morgan > Network Engineer > South Carolina School for the Deaf and Blind > Phone: (864) 577-7548 > > List info : http://www.activedir.org/mail_list.htm > List FAQ : http://www.activedir.org/list_faq.htm > List archive: > http://www.mail-archive.com/activedir%> 40mail.activedir.org/ > List info : http://www.activedir.org/mail_list.htm List FAQ : http://www.activedir.org/list_faq.htm List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
