Launch File In Default External Application

Hi,
I’m very new in c++ developement but I would like to use the already existing function:
api link

In my cpp I just wrote, in the BeginPlay():

{

Super::BeginPlay();

FString percorsoFile2 = “D:\download.png”;

FGenericPlatformProcess::LaunchFileInDefaultExternalApplication( *percorsoFile2 );
}

It compiles correct but when I press Play in the editor and when launchfileindefaultexternalapplication is executed the editor crashes.

In this case I opened a png but the real purpose of this script is to open files like power point slideshows.

Thanks for any help!
As I said I’m very new to c++ so please be patient!

Sorry for necroposting but is the only question about it on the Answerhub, and the issue still exist in 4.25. Seems the crush is caused by an invalid path, to be sure it works try this:

void UMyLibrary::ExecuteFile(FString FilePath, FString Attributes) // Change UMyLibrary with the class the method is in 
{
	FString FixedPath = FPaths::ConvertRelativePathToFull(*FilePath);
	FPlatformProcess::LaunchFileInDefaultExternalApplication(*FixedPath, *Attributes, ELaunchVerb::Open);
	UE_LOG(LogWindows, Log, TEXT("LaunchFileInDefaultExtApp %s %s %s"), *FilePath, *Attributes, *FixedPath);
}