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
14
votes
1 answer

Missing data in Windows file properties dialog when opened by ShellExecuteEx

I want to show the Windows file properties dialog for a file from my C++ code (on Windows 7, using VS 2012). I found the following code in this answer (which also contains a full MCVE). I also tried calling CoInitializeEx() first, as mentioned in…
honk
  • 9,137
  • 11
  • 75
  • 83
9
votes
1 answer

ShellExecuteEx error 299 when launching installer created with Inno Setup

I use Inno Setup to create my first installer. But when the installer is launched, before having the windows screen asking the permission to execute this file, I get a window with this error: ShellExecuteEx a échoué : code 299 Seule une partie…
wyllyjon
  • 505
  • 1
  • 5
  • 20
9
votes
3 answers

unelevated program starts an elevated updater, updater should wait for finishing of program

I have 2 apps, program.exe and updater.exe, both written in Delphi5. Program runs without admin-rights (and without manifest), updater has a manifest with "requireAdministrator" because he must be able to write at Program-Folder to update…
8
votes
3 answers

Start external app with ShellExecuteEx and wait until it become initialized

I have an application which needs to run several other applications in chain. I am running them via ShellExecuteEx. The order of running each of the apps is very important cause they are dependant on each other. For example: Start(App1); If…
Wodzu
  • 6,932
  • 10
  • 65
  • 105
7
votes
1 answer

Delphi external exe with admin privileges is minimized in Windows 8

I have an issue where the Windows 8 User Account Control (UAC) popup is minimized when I execute a command line helper program that requests admin privileges in its manifest. The UAC popup window just blinks yellow in the Windows taskbar, causing a…
spurgeon
  • 1,082
  • 11
  • 34
6
votes
3 answers

How to create a process that is not a child of it's creating process?

I have two processes, A and B. At some point A creates B. After B is created, if A's process tree is killed, I want B to still be around. I am using CreateProcess() to create B, and I can't seem to find any way to make it create the process without…
Sinenomen
  • 244
  • 5
  • 11
4
votes
1 answer

ShellExecuteEx error on a write protected USB drive?

I'm trying to test an application on a write protected USB drive, I want to use the ShellExecuteEx API (I need to use this API call because I need the lpVerb := "runas") call to execute a second program, but I keep getting a "Write Protect Error"…
eyeClaxton
  • 480
  • 4
  • 15
3
votes
3 answers

How to detect if launching through ShellExecuteEx is cancelled by UAC

I launch the exe through ShellExecuteEx: tstring sPath = _T("C:\\Test\\MyApp.exe"); tstring sArgs = _T("/S"); SHELLEXECUTEINFO lpExecInfo = {0,}; lpExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); lpExecInfo.lpFile =…
Vitaly
  • 597
  • 1
  • 5
  • 12
3
votes
1 answer

ShellExecuteEx with SEE_MASK_FLAG_NO_UI displays message anyway

On my system the .xyz extension is not registered at all. So when I double click on an .xyz file in the Explorer, Windows 10 pops up the standard "How do you want to open this file" dialog which is expected. Now when I run this short snippet, the…
Jabberwocky
  • 48,281
  • 17
  • 65
  • 115
3
votes
2 answers

Wait for the process started by IShellDispatch2.ShellExecute

I am using IShellDispatch2.ShellExecute to run a process under standard user from my elevated process, as described in Raymond Chen's article. Unlike ShellExecuteEx, this method does not return any information about the process. I need to know when…
lpVoid
  • 31
  • 2
3
votes
1 answer

Wait till a file editing ends

I have next task. It is necessary to wait of end of editing Microsoft Office files.I use next conventional approach: file is editing While file is busy: function FileIsBusy(AFileName: string): Boolean; var F: Integer; begin F :=…
Semyon.Khmelev
  • 197
  • 1
  • 14
3
votes
1 answer

ShellExecuteEx crashes in Excel VBA

Since Windows updates occurred, an API call to ShellExecuteEx(sExecuteInfo) crashes, saying: unhandled exception at 0x75F7A529 (shell32.dll) Access violation reading location 0x68686903 I have no clue what is wrong here, can you help me…
3
votes
0 answers

Win32: TerminateProcess defeated by Windows Error Report dialog

I'm working on a program ("A") which uses ShellExecuteEx to call another program ("B") that occasionally crashes. Program A can detect crash of B, and can kill B using TerminateProcess. However, when B crashes (and before A has terminated it), up…
gwideman
  • 2,705
  • 1
  • 24
  • 43
3
votes
1 answer

Set Path Variable Permanently Using ShellExecuteEx

I come up with this code. It will execute correctly and return true. but it doesn't change Path variable's value. When I type like this --> setx Path "C:\Program Files\Java\jdk1.7.0_02\bin\" in cmd, it works and change the Path value here is the…
Aspen
  • 53
  • 1
  • 9
2
votes
1 answer

Process.Start is very slow

I'm currently using this method and it works perfectly: public static void CreateEmailInDefaultMailEditor(string to, string subject, string body) { Process.Start($"mailto:{to}?subject={subject}&body={body}"); } I then tried it on…
Bidou
  • 7,378
  • 9
  • 47
  • 70
1
2 3 4 5