Questions tagged [shellexecuteex]

A Windows shell function used to perform action(s) on a file system object. Differs from the basic shell execute/run and ShellExecute functions in that it utilizes the SHELLEXECUTEINFO structure.

ShellExecuteEx is a Windows shell function that performs an operation on a specified file system object. In contrast to the ShellExecute function, it only takes a single parameter, which is a pointer to a SHELLEXECUTEINFO structure. This structure combines multiple input and output parameters.

75 questions
2
votes
2 answers

WinApi ShellExecuteEx - using verb 'copy' on a file list

is it possible to use ShellExecuteEx to copy or cut a group of files in a given directory ? The Windows function works fine on a single file but I can't find anywhere any tips over the subject (with a file list). I don't expect any alternative…
Bz01
  • 21
  • 1
  • 2
2
votes
2 answers

Why are the ShellExecuteEx() parameters not working?

Let say I want the program "C:\MyProgram.exe" to run with parameters that are two variables. The problem that occurs is that MyProgram only receives 2 parameters, while I clearly pass 3 parameters. My code: SHELLEXECUTEINFO ShExecInfo = { 0…
moffeltje
  • 4,521
  • 4
  • 33
  • 57
2
votes
0 answers

What can cause ShellExecuteEx fail with COMADMIN_E_REGDB_SYSTEMERR when started from the Delphi IDE?

I have a rather strange problem: My program uses ShellExecuteEx to start another program. This works fine when my program runs stand alone, but fails when it gets started from the Delphi IDE where "Started from the Delphi IDE" means either: Run ->…
dummzeuch
  • 10,975
  • 4
  • 51
  • 158
2
votes
2 answers

ShellExecuteEx with SEE_MASK_FLAG_NO_UI displays error when starting .NET app on system without .NET

The ShellExecuteEx Win32 function call has a flag SEE_MASK_FLAG_NO_UI in its SHELLEXECUTEINFO structure, which should suppress any error dialogs which could be displayed because of an error when launching an application. The MSDN documentation here…
Pierre Arnaud
  • 10,212
  • 11
  • 77
  • 108
1
vote
3 answers

ShellExecuteEx returning 42 in hInstApp when expecting a 31 (No file association)

When using ShellExecuteEx in Delphi 7 to open a file using a verb, I always seem to be getting 42 back as a result in hInstApp, even though I'm expecting to get a failure and a 31 result, as there is no file association. I am moving from…
nehpets
  • 91
  • 1
  • 2
  • 7
1
vote
0 answers

VB.net: Showing the File Properties window from a 64-bit application?

I am trying to build an application similar to the Windows File Explorer, in VB.net. I want do use the the same window that is displayed when right clicking a file in the File Explorer, clicking Properties in the meny. The thing is, this is very…
1
vote
1 answer

Sending argument to an .exe via SHELLEXECUTEINFO

I have an .exe which takes 2 arguments. I need to run the .exe file between my program in runtime. I have used ShellExecuteEx to run the .exe file but it is not taking the arguments. Please help where did i went wrong. I am posting my code…
G93
  • 21
  • 1
  • 3
1
vote
0 answers

How to hide ShellExecuteEx console window but not Application window?

I have a program which needs to call another program. So after some research I found ShellExecuteEx command with appropriate SHELLEXECUTEINFO to call an external program. That works fine so far, but it pops up actually two windows: command line and…
Feuerteufel
  • 571
  • 5
  • 16
1
vote
1 answer

Run Multiple Tasks in the same Command Line using ShellExecuteEx in Delphi

I am trying to run multiple tasks in the same command line using ShellExecuteEx. I have no issue running it in cmd.exe, as shown below: C:\Program Files (x86)\AppFolder>App.exe MyTask1&&App.exe MyTask2 Running task: Task1 Table: Task1…
Ciodensky
  • 59
  • 1
  • 1
  • 11
1
vote
1 answer

C++ ShellExecuteEx does not execute exe with parameter by not generating output from that exe

for the last few days or weeks. In Visual Studio C++, I am having hard time with ShellExecuteEx() trying to run an exe with a paramter inside an exe. The way it happens is that I run the debug program in Visual Studio (even outside too). The program…
1
vote
1 answer

open and close an external program from Delphi

in my app (Delphi XE10) i want to open a file (RTF) with user's default editor (MSword or OpenOffice writter or else) and be able to close this editor from my app. I tried to use the code bellow but without success on closing the editor procedure…
JimPapas
  • 715
  • 2
  • 12
  • 27
1
vote
1 answer

Get exit code from batch file in Inno Setup using ShellExecuteEx

I have several batch files which I execute from Inno Setup. I use ShellExecuteEx() to execute batch files: function ShellExecuteWait(const Verb, Filename, Params, WorkingDir: string; const ShowCmd: integer; const Timeout: cardinal; var ExitCode:…
Dennis Jones
  • 211
  • 2
  • 13
1
vote
1 answer

How to ShellExecute a program AND THEN send it command line text

I can open an external program fine with ShellExec ret := ShellExecute(handle, 'open', PChar(filename), nil, nil, SW_NORMAL); but then I would like to send it commands like: msg := 'open ftp://MyUser:MyPass@www.website.com'; Is this possible?
Seti Net
  • 693
  • 1
  • 7
  • 24
1
vote
0 answers

The way to start Microsoft Edge from C++ in Windows 10 does not work in Windows Server 2016

The following file test.cc is to launch Microsoft Edge with specific URL: #include int main() { SHELLEXECUTEINFOW sei = { sizeof sei }; sei.lpVerb = L"open"; sei.lpFile = L"microsoft-edge:http://www.stackoverflow.com"; …
Lee
  • 535
  • 5
  • 19
1
vote
1 answer

lpParameters in ShellExecuteEx runas

I am working on an application in qt where I am required to use ShellExecuteEx to launch an application. I am running a batch file and I need to pass it 2 arguments. The first argument is just a letter, but the second is a path that may or may not…
thecaptain0220
  • 2,098
  • 5
  • 30
  • 51