How to expand environment variables remotely with .NET?

后端 未结 4 1982
滥情空心
滥情空心 2020-12-11 16:10

I need a way to expand environment variable on a remote machine.

Suppose I have a path to a folder %appdata%\\MyApp\\Plugins or %ProgramFiles%\\My

4条回答
  •  甜味超标
    2020-12-11 16:57

    The question doesn't make sense. Environment variables are not per-machine variables. For instance, you can expect %appdata% to point inside the C:\users\ directory, but precisely where obviously depends to the user. Logging in as admin still doesn't help you; that would merely tell you where the admin's %appdata% is.

提交回复
热议问题