这条语句直接获取安装包文件名 String.SplitPath(SessionVar.Expand("%SourceFilename%")).Filename
下边分开来讲一下:
%SourceFilename% 是安装包完整路径变量。
SessionVar.Expand("%SourceFilename%") 用于获取安装包完整路径包括文件名。
String.SplitPath 拆分路径返回值是个table,table成员如下:
KEY | TYPE | DESCRIPTION |
Drive | string | The drive portion of the path (for example, C:). |
Folder | string | All of the folders within the path (for example, \MyFolder1\MyFolder2\). |
Filename | string | The filename in the path (for example, "myfile"). |
Extension | string | The file extension in the path (for example, ".exe"). |
Dirve : 磁盘盘符,例如 "C:"
Folder:所在文件夹,例如 "C:\Windows"
Filename:文件名, 例如"setup"
Extension:扩展名,例如".exe"