current windows account

current windows account

Postby Silvio.Falconi » Mon Oct 18, 2021 9:57 am

Code: Select all  Expand view
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
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: current windows account

Postby cnavarro » 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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: current windows account

Postby Silvio.Falconi » 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 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
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: current windows account

Postby nageswaragunupudi » Tue Oct 19, 2021 3:46 am

You can also use
Code: Select all  Expand view

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10628
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: current windows account

Postby Silvio.Falconi » Tue Oct 19, 2021 7:15 am

nageswaragunupudi wrote:You can also use
Code: Select all  Expand view

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 view
WinExec( "rundll32.exe url.dll, FileProtocolHandler " + cUrl, 0 )


but this command save the file into

Code: Select all  Expand view
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
Silvio.Falconi
 
Posts: 7053
Joined: Thu Oct 18, 2012 7:17 pm

Re: current windows account

Postby Jimmy » Tue Oct 19, 2021 9:22 am

old Cl*pper Solution
Code: Select all  Expand view
LOCAL cPath := GETENV("USERPROFILE")
LOCAL aDir  := DIRECTORY(cPath+"\downloads\*.*")
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1726
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 52 guests

cron