Hello,
Thank you all for your help. Until now, everything is running just fine.
I use this function to change environment variables. Because I think it is better to change user environment varaibles, I changed my code to HKEY_CURRENT USER like this :
#DEFINE HKEY_CURRENT_USER 2147483649 // 0x80000002
......
IF RegRet
oReg := TReg32():Create( HKEY_CURRENT_USER,"Environment")
IF UPPER(cPar) = "J"
IF !EMPTY(cNAAM) ; oReg:Set("STJUDA",cNAAM) ; ENDIF
ELSE
IF !EMPTY(cNAAM) ; oReg:Set("STCURA",cNAAM) ; ENDIF
IF !EMPTY(cNR ) ; oReg:Set("STCUNR",cNR ) ; ENDIF
ENDIF
oReg:Close()
ENDIF
By using this code, the variables are changed in the register.
Still one problem left : how do I activate them without having to reboot or to logoff?
Thanks.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773