Hey HF,
I updated my System to Windows 10 yesterday, which resulted in several of my own applications not working, which I tracked down to the Path finding tools which c# offers, such as
Code Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
Windows does not return anything for this, thus I wanted to ask if anybody already has found a solution for this.
many thanks
Code Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
(Jul 30, 2015 10:22 AM)Sleeping With Sirens Wrote: Code Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
![[Image: FObOORf.png]](https://i.imgur.com/FObOORf.png)
That's not what OP asked.
I don't have w10
![[Image: BQujHED.png]](https://i.imgur.com/BQujHED.png)
I get the right Path.
(Jul 30, 2015 10:21 AM)mrnikbobjeff Wrote: Hey HF,
I updated my System to Windows 10 yesterday, which resulted in several of my own applications not working, which I tracked down to the Path finding tools which c# offers, such as
Code Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
Windows does not return anything for this, thus I wanted to ask if anybody already has found a solution for this.
many thanks
Use Code Environment.ExpandEnvironmentVariables("%USERPROFILE%")
(Jul 30, 2015 11:55 AM)n0$f3ratu$ Wrote: Use Code Environment.ExpandEnvironmentVariables("%USERPROFILE%")
no, this is a horrible solution.
Stick w/ GetFolderPath()
slowly becoming less active, contact me on-site before dealing.
Jul 31, 2015 09:21 AM
(This post was last modified: Jul 31, 2015 09:23 AM by pille.)
string s = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
Console.WriteLine("{0} {1}", "Appdata Path:", s,);
Console.ReadLine();
////
result:
Appdata Path: C:\Users\Jason\AppData\Roaming
post above, that doesn't compile.
DO NOT DEAL WITH THIS MEMBER
(Jul 31, 2015 09:21 AM)pille Wrote: Code Console.WriteLine("{0} {1}", "Appdata Path:", s,);
v
Code Console.WriteLine("AppData path: {0}", s);
?
Jul 31, 2015 11:48 AM
(This post was last modified: Jul 31, 2015 11:49 AM by mrnikbobjeff.)
Thanks for all this help, it seems to be related to the issue described here RyuJIT problemsThanks for the help, the functions work as expected but in release mode wrong arguments were passed.
/Closed
Yea, i saw it a couple days ago, pretty fucked up bug, that's why you want before using new software, especially entire frameworks and OS's.
If you're sure that's it, you can always downgrade to .net 4.5, don't check optimizations, disable RyuJIT or wait for a fix, which won't take long since the bug was already reported couple days ago.
But you already now that... so.
(Jul 30, 2015 10:45 PM)Assault Wrote: no, this is a horrible solution.
Stick w/ GetFolderPath()
LUlz, one queries registry and one queries environment block. difference is negligible so shut the fuck up
(Jul 31, 2015 01:39 PM)salmoneus Wrote: LUlz, one queries registry and one queries environment block. difference is negligible so shut the fuck up
Environment block? LOL.
The difference is DIFFERENT because one uses WinAPI which is reliable, the other one uses Environment variables which can be CHANGED.
(Jul 31, 2015 05:46 PM)He B TeMy Wrote: Environment block? LOL.
The difference is DIFFERENT because one uses WinAPI which is reliable, the other one uses Environment variables which can be CHANGED.
ur fucking stupid they both use winapi just goes to show ur lack of understanding lol
who the fuck is going to change the userprofile variable??
call chain:
![[Image: EpCGyvV.png]](https://i.imgur.com/EpCGyvV.png)
sources: http://reflector.webtropy.com/default.as...ronment@cs
& corresponding reactos files
http://stackoverflow.com/questions/28376...riable-for <<<< to educate you ???
now let's see the other:
![[Image: 26qLQb9.png]](https://i.imgur.com/26qLQb9.png)
--->
http://doxygen.reactos.org/d6/d63/shellp...365c4ab36d
u fucking cheeky cunt thinking you know shit GOOD GOD THIS PLACE IS A CESSPOOL OF NARCISSISM
(Jul 31, 2015 06:26 PM)salmoneus Wrote: ur fucking stupid they both use winapi just goes to show ur lack of understanding lol
who the fuck is going to change the userprofile variable??
call chain:
![[Image: agE637l.png]](https://i.imgur.com/agE637l.png)
![[Image: EpCGyvV.png]](https://i.imgur.com/EpCGyvV.png)
sources: http://reflector.webtropy.com/default.as...ronment@cs
& corresponding reactos files
http://stackoverflow.com/questions/28376...riable-for <<<< to educate you ???
now let's see the other:
![[Image: 26qLQb9.png]](https://i.imgur.com/26qLQb9.png)
--->
http://doxygen.reactos.org/d6/d63/shellp...365c4ab36d
u fucking cheeky cunt thinking you know shit GOOD GOD THIS PLACE IS A CESSPOOL OF NARCISSISM
![[Image: 1kKldf5.png]](https://i.imgur.com/1kKldf5.png)
Shut the fuck up you fucking idiot, you don't use environment variables if there's a more reliable and consistent way to get them.
This place is a chesspool of fucking moron's like you you piece of shit.
All that crap in one post just to prove what? You're still the same arrogant kid.
|