H
Hans Meier
Hello
I would like to read out the path of mydocuments and then change it.
This is how i am trying to do it:
imports system.console
imports system.environment
Module Module1
Sub Main()
WriteLine(GetFolderPath(SpecialFolder.MyDocuments).ToString)
SetEnvironmentVariable(SpecialFolder.MyDocuments, _
"C:",EnvironmentVariableTarget.Machine)
SetEnvironmentVariable(SpecialFolder.MyDocuments, _
"C:", EnvironmentVariableTarget.User)
SetEnvironmentVariable(SpecialFolder.MyDocuments, _
"C:", EnvironmentVariableTarget.Process)
' now find out whether it changed
WriteLine(GetFolderPath(SpecialFolder.MyDocuments).ToString)
End Sub
End Module
But nothing changes. I get twice the same path.
What am i doing wrong? Can someone help me?
Thank you
Hans
I would like to read out the path of mydocuments and then change it.
This is how i am trying to do it:
imports system.console
imports system.environment
Module Module1
Sub Main()
WriteLine(GetFolderPath(SpecialFolder.MyDocuments).ToString)
SetEnvironmentVariable(SpecialFolder.MyDocuments, _
"C:",EnvironmentVariableTarget.Machine)
SetEnvironmentVariable(SpecialFolder.MyDocuments, _
"C:", EnvironmentVariableTarget.User)
SetEnvironmentVariable(SpecialFolder.MyDocuments, _
"C:", EnvironmentVariableTarget.Process)
' now find out whether it changed
WriteLine(GetFolderPath(SpecialFolder.MyDocuments).ToString)
End Sub
End Module
But nothing changes. I get twice the same path.
What am i doing wrong? Can someone help me?
Thank you
Hans