Thank you all for your help, however this subroutine from 2005 actually
works perfectly:

SUBROUTINE ATGETDOCPATH(PATH)

* Get path to My Documents folder using AccuTerm Script

SCR='InitSession.Output MyDocPath() & Chr$(13)'

SCR=SCR:CHAR(25):'End Sub'

SCR=SCR:CHAR(25):'Private Declare Function SHGetFolderPath& Lib
"shfolder.dll" Alias "SHGetFolderPathA" (ByVal hwnd&,ByVal fldr&,ByVal
tok&,ByVal dw&,ByVal Path$)'

SCR=SCR:CHAR(25):'Function MyDocPath() As String'

SCR=SCR:CHAR(25):'Dim path As String'

SCR=SCR:CHAR(25):'On Error Resume Next'

SCR=SCR:CHAR(25):'path=String$(1000,0)'

SCR=SCR:CHAR(25):'SHGetFolderPath 0,5,0,0,path'

SCR=SCR:CHAR(25):'path=Left$(path,InStr(path,Chr$(0))-1)'

SCR=SCR:CHAR(25):'If Len(path) Then'

SCR=SCR:CHAR(25):'If Right$(path,1)<>"\" Then path=path & "\"'

SCR=SCR:CHAR(25):'End If'

SCR=SCR:CHAR(25):'MyDocPath=path'

SCR=SCR:CHAR(25):'End Function'

SCR=SCR:CHAR(25):'Sub Dummy'

PRINT CHAR(27):CHAR(2):'P':SCR:CHAR(13):

ECHO OFF

PROMPT ''

INPUT PATH:

PROMPT '?'

ECHO ON

RETURN

END

Sincerely,
David Laansma
IT Manager
Hubbard Supply Co.
Direct: 810-342-7143
Office: 810-234-8681
Fax: 810-234-6142
www.hubbardsupply.com
"Delivering Products, Services and Innovative Solutions"

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Holt, Jake
Sent: Thursday, March 04, 2010 12:31 PM
To: U2 Users List
Subject: Re: [U2] windows/dos my documents environment variable

I don't think it works if the user moves their documents/My documents
anyway so it's probably not the best place to be dropping files.  I've
always avoided it unless it's a .net app where I can use
Environment.SpecialFolder.MyDocuments, even then I've only used it once
or twice for unimportant things.

%HOMEPATH% actually goes to \Documents and Settings\{username} not
{drive}:\Documents and Settings\{username} which is why it's not working
the same as %USERPROFILE%.

Make a network share and use \\server\share\%username% instead =).

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kevin King
Sent: Thursday, March 04, 2010 9:59 AM
To: U2 Users List
Subject: Re: [U2] windows/dos my documents environment variable

...Or moved it back to where it was in XP.

I wonder what it's like to be in on the design meeting where someone
says
"hey, let's just move stuff in this next release, k?".
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to