How to read %Temp% Env variable on remote machine

G

Guest

Hi

We can use Environment class to read %Temp% variable o local machine. But I want to read this variable for currently logged on used for remote machine. Is there anyway to do this using .NET? I know I can read remote registry and I can read Environment subkey, for key, current user but that value contains %UserProfile% which in turn contains %System Drive%. Is there anyway to avoid reading so many registry keys and get it the way Environment class works

Thanks
Vinay
 
E

ery

Well try this
[C#]
public static string GetFolderPath(
Environment.SpecialFolder folder
);


Regards
Erymuzuan Mustapa

Vinay said:
Hi,

We can use Environment class to read %Temp% variable o local machine. But
I want to read this variable for currently logged on used for remote
machine. Is there anyway to do this using .NET? I know I can read remote
registry and I can read Environment subkey, for key, current user but that
value contains %UserProfile% which in turn contains %System Drive%. Is there
anyway to avoid reading so many registry keys and get it the way Environment
class works?
 
G

Guest

Hi
I want to read Temp which is set on remote machine. The solution you provided will work for local machine

TIA
Vinay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top