Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

Windows 10 C# Appdata Path

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)

[Image: FObOORf.png]
(Jul 30, 2015 10:22 AM)Sleeping With Sirens Wrote:  
Code
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)

[Image: FObOORf.png]

That's not what OP asked.
I don't have w10
[Image: BQujHED.png]
I get the right Path.
[Image: sQ9UGrj.png]
(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%")
[Image: logo.gif]
(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.
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.
(Jul 31, 2015 09:21 AM)pille Wrote:  
Code
Console.WriteLine("{0} {1}", "Appdata Path:", s,);

v

Code
Console.WriteLine("AppData path: {0}", s);

?
Thanks for all this help, it seems to be related to the issue described hereRyuJIT 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: agE637l.png]
[Image: 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]
--->
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]
(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]
[Image: 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]
--->
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]

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.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Emre_Jan 12, 2021 11:16 PM 0 141 Jan 12, 2021 11:16 PM
Last Post: Emre_
[.NET] by linc0ln.dllMar 30, 2016 02:48 AM 2 121 Mar 30, 2016 02:48 AM
Last Post: Slavoj Žižek
[C#] by DaHaxorAug 9, 2015 05:42 AM 5 221 Aug 9, 2015 05:42 AM
Last Post: Terry A. Davis