Many thanks can I take a further liberty in answering your question with yet another question?
Your "?" - Did you try GetEnvironmentVariable function (winbase.h) - Win32 apps | Microsoft Docs ?
Can I answer with:
Is there (of some Kind like for instance Emu8086) that would be able to run C++ code to check if it works & possibly feedback errors compatable that is compatable with XP as my skills in C++ are shall we say are very sadly lacking as suggested in my 1st post. I know what I want to do but don't know how to get there. The short answer is no sorry!
I have been researching further & I have found this snippet of code from (To reveal the source click on the link below)
C++/CLI Code Snippet - Access current environment directories and logical drives[^]
which states this
Console::WriteLine("Get Environment Variable: Home Drive " + Environment::GetEnvironmentVariable("HOMEDRIVE"));
However Line 15 (the last 2 lines) is all one line & it states Writeline which infers output to console?
Then could Homedrive be called/injected into this line in the first post
I am assuming I would need new headers & would need to know where to insert the code. I am assuming prior to the execution of the code in the 1st post I made (which I did not write), because once the code is executed within the C++ it would remain memory resident to access later to envoke the HOMEDRIVE system variable. Hope I am not blowing smoke here just a theory?
P.S. Is the C++ code in post 1 for windows or commandline as the above code I think is for commandline, I wouldn't have thought mixing code from two standpoints would Not be Good?
All the best,
modified 4-Sep-20 9:35am.