From 0e5f6897def5e002cb3ec3fb71fff679c9873d3a Mon Sep 17 00:00:00 2001
From: non124x124 <145536205+non124x124@users.noreply.github.com>
Date: Fri, 28 Feb 2025 15:31:07 +0300
Subject: [PATCH 1/3] Update nf-shellapi-shellexecutew.md
Undocumented behaviour in ShellExecuteW:
If lpFile specifies an executable file and "open" or "runas" verbs are used in lpOperation, a whitespace character is appended to the commandline of the new created process.
If lpParameters is not null, the whitespace is added between the end of the executable name and lpParameters string in the commandline of the new created process.
Suggestion:
Document that ShellExecuteW appends a whitespace character to the commandline of the created process if lpFile specifies an executable file and open or runas verbs are used for lpOperation.
---
sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md b/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md
index d3564e159d94..7f7a22d30059 100644
--- a/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md
+++ b/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md
@@ -120,6 +120,8 @@ Type: LPCTSTR
A pointer to a null-terminated string that specifies the file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
+If lpFile specifies an executable file and "open" or "runas" verbs are used in lpOperation, a whitespace character is appended to the commandline of the created process.
+
### -param lpParameters [in, optional]
Type: LPCTSTR
From 18d73776c9cb8ba49a0fc14a9b3692991b007835 Mon Sep 17 00:00:00 2001
From: non124x124 <145536205+non124x124@users.noreply.github.com>
Date: Fri, 28 Feb 2025 16:08:07 +0300
Subject: [PATCH 2/3] Update nf-shellapi-shellexecutew.md
Document that the command line string of a process created with "open" or "runas" verbs specified in lpOperation includes a trailing whitespace character and if parameters are passed to the application with lpParameters, they are appended to that command line.
---
sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md b/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md
index 7f7a22d30059..ea852ffc34b8 100644
--- a/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md
+++ b/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md
@@ -126,7 +126,7 @@ If lpFile specifies an executable file and "open" or "runas" verbs are us
Type: LPCTSTR
-If lpFile specifies an executable file, this parameter is a pointer to a null-terminated string that specifies the parameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
+If lpFile specifies an executable file, this parameter is a pointer to a null-terminated string that specifies the parameters to be passed to the application. The command line string of a process created with "open" or "runas" verbs specified in lpOperation includes a trailing whitespace character and the parameters are appended to that command line. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
### -param lpDirectory [in, optional]
From a9773ddda778dbf2ec7fba23f5fb1496285a1673 Mon Sep 17 00:00:00 2001
From: non124x124 <145536205+non124x124@users.noreply.github.com>
Date: Fri, 28 Feb 2025 17:18:27 +0300
Subject: [PATCH 3/3] Update nf-shellapi-shellexecutew.md
Better wording.
---
sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md b/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md
index ea852ffc34b8..6fb60d823a94 100644
--- a/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md
+++ b/sdk-api-src/content/shellapi/nf-shellapi-shellexecutew.md
@@ -120,13 +120,13 @@ Type: LPCTSTR
A pointer to a null-terminated string that specifies the file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb. If a relative path is used for the lpDirectory parameter do not use a relative path for lpFile.
-If lpFile specifies an executable file and "open" or "runas" verbs are used in lpOperation, a whitespace character is appended to the commandline of the created process.
+If lpFile specifies an executable file and "open" or "runas" verbs are used in lpOperation, the command line string of the launched process includes a trailing whitespace character.
### -param lpParameters [in, optional]
Type: LPCTSTR
-If lpFile specifies an executable file, this parameter is a pointer to a null-terminated string that specifies the parameters to be passed to the application. The command line string of a process created with "open" or "runas" verbs specified in lpOperation includes a trailing whitespace character and the parameters are appended to that command line. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
+If lpFile specifies an executable file, this parameter is a pointer to a null-terminated string that specifies the parameters to be passed to the application. The command line string for a process launched with "open" or "runas" verbs in lpOperation includes a trailing whitespace character and the parameters are appended to that command line string. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
### -param lpDirectory [in, optional]