From 92d558b7d62d2725e7a6bb10e3d1caf885adb88e Mon Sep 17 00:00:00 2001 From: wk6768 <676865875eb7@gmail.com> Date: Sun, 8 Jan 2023 13:47:58 +0800 Subject: [PATCH] Fixed the issue that the RDP file was locked under the administrator user --- RDP2MSILib/RDP2MSILib.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RDP2MSILib/RDP2MSILib.vb b/RDP2MSILib/RDP2MSILib.vb index 408033d..31db743 100644 --- a/RDP2MSILib/RDP2MSILib.vb +++ b/RDP2MSILib/RDP2MSILib.vb @@ -36,7 +36,9 @@ Public Class RDP If Not WixInstalled() Then Exit Sub 'Get RDP file parent folder path - Dim rdpParentFolder = My.Computer.FileSystem.GetParentPath(rdpFilePath) + 'Dim rdpParentFolder = My.Computer.FileSystem.GetParentPath(rdpFilePath) + Dim lastSlashIndex = rdpFilePath.LastIndexOf("\") + Dim rdpParentFolder = Left(rdpFilePath, lastSlashIndex) 'Get the RDP filename and filename minus extension Dim rdpFileName = My.Computer.FileSystem.GetFileInfo(rdpFilePath).Name