JumpTask.ApplicationPath Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the path to the application.
public:
property System::String ^ ApplicationPath { System::String ^ get(); void set(System::String ^ value); };
public string ApplicationPath { get; set; }
member this.ApplicationPath : string with get, set
Public Property ApplicationPath As String
Property Value
The path to the application. The default is null
.
Examples
The following example shows how to declare a JumpTask in markup. The JumpTask opens a text file named readme.txt
in the Notepad application.
<JumpTask Title="Read Me"
Description="Open readme.txt in Notepad."
ApplicationPath="C:\Windows\notepad.exe"
IconResourcePath="C:\Windows\System32\imageres.dll"
IconResourceIndex="14"
WorkingDirectory="C:\Users\Public\Documents"
Arguments="readme.txt"/>
The following example shows how to configure a JumpTask in code. The JumpTask opens the Calculator application.
// Configure a new JumpTask.
JumpTask jumpTask1 = new JumpTask();
// Get the path to Calculator and set the JumpTask properties.
jumpTask1.ApplicationPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "calc.exe");
jumpTask1.IconResourcePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "calc.exe");
jumpTask1.Title = "Calculator";
jumpTask1.Description = "Open Calculator.";
jumpTask1.CustomCategory = "User Added Tasks";
Remarks
If the ApplicationPath property is not specified, then the path of the current running process is implied. An application can contain tasks for executables other than itself.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기