我在Environment.SystemDirectory中的哪里找到文件 [英] Where would I find a file in the Environment.SystemDirectory
问题描述
我试图在UAC进入Environment.SystemDirectory的情况下创建并写入dat文件,该文件最终存储在虚拟商店中.
我可以在当前目录旁边的UAC上使用哪个目录,以使它对用户不那么可见.还是可以将其留在VS中?
我以为它将最终在system32下使用,但是由于UAC的作用,它似乎正在将文件发送到虚拟存储中.
C:\ Users \ MYPC \ AppData \ Local \ VirtualStore \ Windows \ System32
私有EFile作为字符串= Environment.SystemDirectory"\ sysmondata4.dat"
I tried to create and write to a dat file with the UAC on to the Environment.SystemDirectory and it ends up in the virtual store.
What directory could I use with the UAC "on" beside the current directory so that its not quite that visible to the user. Or can I leave it in the VS.?
I thought it would end up under system32 but it appears to be sending the file to the virtual store because of the UAC.
C:\Users\MYPC\AppData\Local\VirtualStore\Windows\System32
Private EFile As String = Environment.SystemDirectory "\sysmondata4.dat"
推荐答案
Dim EFile As String = IO.Path.Combine(Environment.SystemDirectory, "sysmondata4.dat")
这篇关于我在Environment.SystemDirectory中的哪里找到文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!