Page 1 of 1

current windows account

Posted: Mon Oct 18, 2021 9:57 am
by Silvio.Falconi

Code: Select all | Expand

C:\Users\silvio\Downloads


Exist a function to get the current account ?

Re: current windows account

Posted: Mon Oct 18, 2021 10:00 am
by cnavarro
WNetGetUser()

Re: current windows account

Posted: Mon Oct 18, 2021 11:52 am
by Silvio.Falconi
cnavarro wrote:WNetGetUser()

thanks

Re: current windows account

Posted: Tue Oct 19, 2021 3:46 am
by nageswaragunupudi
You can also use

Code: Select all | Expand


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

Re: current windows account

Posted: Tue Oct 19, 2021 7:15 am
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

Re: current windows account

Posted: Tue Oct 19, 2021 9:22 am
by Jimmy
old Cl*pper Solution

Code: Select all | Expand

LOCAL cPath := GETENV("USERPROFILE")
LOCAL aDir  := DIRECTORY(cPath+"\downloads\*.*")