current windows account

Post Reply
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

current windows account

Post by Silvio.Falconi »

Code: Select all | Expand

C:\Users\silvio\Downloads


Exist a function to get the current account ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: current windows account

Post by cnavarro »

WNetGetUser()
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: current windows account

Post by Silvio.Falconi »

cnavarro wrote:WNetGetUser()

thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: current windows account

Post by nageswaragunupudi »

You can also use

Code: Select all | Expand


NetName( .T. ) --> UserName
NetName()      --> Computer Name
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
Silvio.Falconi
Posts: 7133
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: current windows account

Post by Silvio.Falconi »

nageswaragunupudi wrote:You can also use

Code: Select all | Expand


NetName( .T. ) --> UserName
NetName()      --> Computer Name
 


I need it because I found the solution to download files also on Windows Seven

Code: Select all | Expand

WinExec( "rundll32.exe url.dll, FileProtocolHandler " + cUrl, 0 )


but this command save the file into

Code: Select all | Expand

C:\Users\silvio\Downloads


then I must copy the file on my app folder .\storico\

I think it is the last solution for windows Seven
while in windows 10 I have no problems
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: current windows account

Post by Jimmy »

old Cl*pper Solution

Code: Select all | Expand

LOCAL cPath := GETENV("USERPROFILE")
LOCAL aDir  := DIRECTORY(cPath+"\downloads\*.*")
greeting,
Jimmy
Post Reply