0x49D1
0x49D1

Reputation: 8704

Can i open directory from jump list

Im writing WPF application and want to add ability to call jump list and open program configuration, app.config or log directory from it. Is it possible(cant find the way to do that..just JumpTasks with application path and JumpPath with path to file, and not just path to be opened via explorer)?

Upvotes: 1

Views: 324

Answers (1)

0x49D1
0x49D1

Reputation: 8704

Found answer here. Seems that JumpList wasnt designed for opening anything but files or applications, associated with current program. So that when we see directories in explorer tasklist -it actually means: use explorer with parameters. By the way ill try to use it.
Update
made it with such code:

          string explorerPath = @"%windir%\explorer.exe";

            JumpTask path = new JumpTask
          {
              CustomCategory = "Paths",
              Title = "Open program directory",
              IconResourcePath = explorerPath,
              ApplicationPath = explorerPath,
              Arguments = @"/root," + AppDomain.CurrentDomain.BaseDirectory,
              Description = AppDomain.CurrentDomain.BaseDirectory
          };

Im leaving this answer here, because someone can have similar incomprehension.

Upvotes: 1

Related Questions