FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour current windows account
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
current windows account
Posted: Mon Oct 18, 2021 09:57 AM
Code (fw): Select all Collapse
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 March-April 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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: current windows account
Posted: Mon Oct 18, 2021 10:00 AM

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
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: current windows account
Posted: Mon Oct 18, 2021 11:52 AM
cnavarro wrote:WNetGetUser()

thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: current windows account
Posted: Tue Oct 19, 2021 03:46 AM
You can also use
Code (fw): Select all Collapse
NetName( .T. ) --> UserName
NetName()      --> Computer Name
Regards



G. N. Rao.

Hyderabad, India
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: current windows account
Posted: Tue Oct 19, 2021 07:15 AM
nageswaragunupudi wrote:You can also use
Code (fw): Select all Collapse
NetName( .T. ) --> UserName
NetName()      --> Computer Name


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

Code (fw): Select all Collapse
WinExec( "rundll32.exe url.dll, FileProtocolHandler " + cUrl, 0 )


but this command save the file into

Code (fw): Select all Collapse
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 March-April 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
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: current windows account
Posted: Tue Oct 19, 2021 09:22 AM
old Cl*pper Solution
Code (fw): Select all Collapse
LOCAL cPath := GETENV("USERPROFILE")
LOCAL aDir  := DIRECTORY(cPath+"\downloads\*.*")
greeting,

Jimmy

Continue the discussion