You should be able to just call %userprofile%\desktop without having the c:\ at the front. if you open your command prompt and type in %userprofile% it'll then give you an error message but it will expand the %userprofile% to it's actual value. Hope that helps
C
CoderGirl42
@CoderGirl42
Posts
-
Default path to Desktop with vista -
Console ApplicationsWell, if you're concerned that your console window will close too quickly by running it with debugging (i.e. without prompting 'press any key to continue'). You can simply add a call to
Console.Readline();
at the end of your Main function. This will keep your console window open until you press a key. for example:static void Main(string\[\] args) { //Do Work Console.Write("press any key to continue"); Console.ReadLine(); //prevents console window from closing. }
Hope that Helps!
-
Catchy title neededHave you considered using "Free Beer" as the title?