函数参考


_WinAPI_PathRemoveArgs

移除给定路径的参数

#Include <WinAPIEx.au3>
_WinAPI_PathRemoveArgs ( $sPath )

参数

$sPath 包含要被移除参数的文件路径

返回值

成功: 返回无参数路径
失败: 返回 0设置@error 非0

注意/说明

This function should not be used on generic command path templates (from users or the registry), but rather
it should be used only on templates that the application knows to be well formed.

相关

详情参考

在MSDN中搜索


示例/演示


#Include <APIConstants.au3>
#Include <WinAPIEx.au3>

Opt('MustDeclareVars', 1)

Global $Path = _WinAPI_AssocQueryString('.txt', $ASSOCSTR_COMMAND)

ConsoleWrite('Command: ' & $Path & @CR)
ConsoleWrite('Path: ' & _WinAPI_PathRemoveArgs($Path) & @CR)
ConsoleWrite('Arguments: ' & _WinAPI_PathGetArgs($Path) & @CR)