访问路径%userprofile%\ AppData \ Local被拒绝

时间:2013-10-07 15:33:13

标签: vb.net

Dim mspasss As String = Environment.GetFolderPath(Environment.CurrentDirectory)
    Dim Ressource1() As Byte = My.Resources.mspass
    FileOpen(1, mspasss, OpenMode.Binary)
    FilePut(1, Ressource1)

返回对%userprofile%的访问权限\ AppData \ Local被拒绝  我不知道还有什么可以帮助

1 个答案:

答案 0 :(得分:1)

您似乎想要写入目录。也许你想要这样的东西:

Dim mspasss As String = Environment.GetFolderPath(Environment.CurrentDirectory)
mspasss = System.Io.Path.Combine(mspasss, "someFile.dat")
Dim Ressource1() As Byte = My.Resources.mspass
FileOpen(1, mspasss, OpenMode.Binary)
FilePut(1, Ressource1)

这使得路径为%userprofile%\ AppData \ Local \ someFile.dat