Function Reference


_WinAPI_PathRemoveArgs

Removes any arguments from a given path

#include <WinAPIShPath.au3>
_WinAPI_PathRemoveArgs ( $sFilePath )

Parameters

$sFilePath The path that contains the path from which to remove arguments.

Return Value

Returns the path of no arguments.

Remarks

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.

See Also

Search PathRemoveArgs in MSDN Library.

Example

#include <APIRegConstants.au3>
#include <WinAPIReg.au3>
#include <WinAPIShPath.au3>

Local $sPath = _WinAPI_AssocQueryString('.txt', $ASSOCSTR_COMMAND)

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