Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Windows.Forms;
- public class MainClass{
- public static void Main(){
- string FolderName = "Download";
- var instanceType = Type.GetTypeFromProgID("Shell.Application");
- dynamic shell = Activator.CreateInstance(instanceType);
- var folder = shell.Namespace("shell:"+FolderName);
- string directory = folder.Self.Path;
- Console.WriteLine(directory);
- }
- }
Add Comment
Please, Sign In to add comment