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
0
votes
0 answers

Control running of jars through ShellExecuteEx

we have a Java project. It has 5 CLI commands which point to the Project.jar they go something like example server: this is a server process which keeps running in the CMD and doesn't close. example client agent: this is a client process which…
hal9000
  • 201
  • 5
  • 25
0
votes
1 answer

How to replicate ShellExecuteEx failure with ERROR_NO_ASSOCIATION error?

My application displays a report to its end-users by composing it into an .htm file that is placed into a user's temp folder (that is derived by calling GetTempPath API). It is then shown to the user with the code as such: //strCmd ==…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
0
votes
2 answers

Task Execution from Delphi using ShellExecute

For days now, I am trying to figure out how to execute an ExeFile with Specified Task in Delphi using ShellExecute. Below is my latest code giving my the error "The specified file was not found": procedure TfrmGTX.btnQuickBooksSyncClick(Sender:…
Ciodensky
  • 59
  • 1
  • 1
  • 11
0
votes
1 answer

Passing multiple cmd.exe parameters/arguments to ShellExecute(Ex)?

I've been trying to get cmd.exe /c /v:on executed using ShellExecute and ShellExecuteEx. However, both methods only seem to accept one parameter, because when it encounters the /v:on, a The filename, directory name, or volume label syntax is…
script'n'code
  • 345
  • 4
  • 17
0
votes
0 answers

Running pg_dump from ShellExecuteEx()

When I attempt to execute pg_dump.exe with ShellExecuteEx(), it returns an exit code of 1 (failed), and I think I may be blind to a simple error I have made. Here is the command line that works at a command prompt: "C:\Program…
BobC
  • 91
  • 3
0
votes
1 answer

Inheriting handles with ShellExecuteEx

CreateProcess has bInheritHandles parameter that allows inheritable handles to be inherited by new process. Does ShellExecuteEx provides such possibility? Especially with runas verb.
diversenok
  • 103
  • 3
0
votes
1 answer

How to convert CreateProcess to ShellExecuteEx?

I use MS detour library to hook CreateProcess and it works fine on Win7. Then I want to replace the detoured CreateProcess with ShellExecuteEx so that I can use 'runas' to silently run the program with administrator priviledge. Unfortunately, the…
Kevin Hou
  • 1
  • 6
0
votes
1 answer

How to disable UAC prompt for a specific application

I have a command line utility for some purpose. I start this utility from a COM DLL using ShellExecuteEx function. When calling ShellExecuteEx, i specify the lpVerb parameter as "runas" so that the utility is started elevated. I call the COM…
Partha
  • 75
  • 1
  • 1
  • 11
0
votes
1 answer

ShellExecuteEx shifting focus to previously opened application for short time returning back to .exe again

I am using ShellExecuteEx(&ShExecInfo) for launching an .exe , when .exe get launched from my application then the windows focus shifts towards the previously opened application (like windows explore) for very short time around 1 sec and after that…
Ted
  • 1
  • 1
0
votes
0 answers

Windows Server limit of maximum processes started by ShellExecuteEx

I have written a small Windows service in C++ that periodically runs .cmd file via ShellExecuteEx. Sometimes happens a issue: ShellExecute returns true - everythings is ok - but no child cmd.exe process was started and SHELLEXECUTEINFO.hProcess is…
jan-vavra
  • 11
  • 1
  • 3
0
votes
1 answer

How to implement "Open With" command using ShellExecuteEx and wait for it to finish?

Seemingly simple task: I want to open the standard Windows dialog for picking the application to be used for opening the file, and then wait for this application to finish. The internet tells that ShellExecuteEx is the way to go. Ok, so here's the…
Alex Jenter
  • 4,324
  • 4
  • 36
  • 61
0
votes
0 answers

How can I get return data when using command line commands?

I inherited a c++ application that runs some commands using 'ShellExecuteEx', specifically using appcmd.exe. I would like to be able to run the command and then get the return data as I would see it if I ran it from the commandline. I don't…
TruthOf42
  • 2,017
  • 4
  • 23
  • 38
0
votes
1 answer

How to find out if process created with ShellExecuteEx owns a window?

I'm using ShellExecuteEx to run external application: SHELLEXECUTEINFO shExInfo = { 0 }; shExInfo.cbSize = sizeof(shExInfo); shExInfo.fMask = SEE_MASK_NOCLOSEPROCESS; shExInfo.hwnd = 0; shExInfo.lpVerb = L"runas"; //…
Amadeusz
  • 1,488
  • 14
  • 21
0
votes
1 answer

Intercept the closing message of a window opened with ShellExecuteEx

I have an annoying program that don't save his position when closed. I've made a small console program that open it and move the window to another position, now i want to save the position when the program close, how i can intercept the closing…
k0tt
  • 76
  • 1
  • 7
0
votes
1 answer

VB6 - How do I open a file from an app running as a service

I have been struggling with this problem for almost a week now. I need a vb6 application which is running as a service to open a file. I don't need to do anything with the file, I just need it to open. I have tried using ShellExecute and…