Re: What am I doing wrong???
Does it work if you right-click the .exe file and choose "Run As Administrator"?
Re: What am I doing wrong???
Quote:
Originally Posted by
groston
I wrote a simple VB.NET application. When the program, which writes a super-short text file to the desktop, is run from within Visual Studio, it runs just fine. However, when it is run by double-clicking the .exe file, this error appears: Unhanded exception has occurred... Access to the path "desktop" is denied.
I checked explorer and the security in the desktop folder appears to be set correctly. What on earth is wrong?
How are you getting the path to the desktop?
Re: What am I doing wrong???
Thanks for the replies.
OptionBase1: Same error
PausiblyDamp: Dim dirPath As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
Re: What am I doing wrong???
Hi can you try:
Also, it is very hard to figure out your problem with only one line of code you provided. I would suggest you post the whole block...