shellexecuteex

UI Automation doesn't see hidden windows?

徘徊边缘 提交于 2021-02-08 10:33:34
问题 I have winforms application that is signed and has manifest with level="requireAdministrator" uiAccess="false". I want to start another application with hidden window and to work with it using UI Automation API. Process procinst = new Process(); procinst.StartInfo = new ProcessStartInfo() { WindowStyle = ProcessWindowStyle.Hidden, UseShellExecute = true, ErrorDialog = true, Verb = "runas", FileName = appfilepath }; procinst.Start(); The new process with hidden window can be seen in Spy++ but

ShellExecuteEx crashes in Excel VBA

随声附和 提交于 2019-12-30 10:43:16
问题 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 please ? Definition : Private Type SHELLEXECUTEINFO cbSize As Long fMask As Long Hwnd As Long lpVerb As String lpFile As String lpParameters As String lpDirectory As String nShow As Long hInstApp As Long lpIDList As Long lpClass As String hkeyClass As Long

ShellExecuteEx crashes in Excel VBA

五迷三道 提交于 2019-12-30 10:43:06
问题 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 please ? Definition : Private Type SHELLEXECUTEINFO cbSize As Long fMask As Long Hwnd As Long lpVerb As String lpFile As String lpParameters As String lpDirectory As String nShow As Long hInstApp As Long lpIDList As Long lpClass As String hkeyClass As Long

ShellExecuteEx crashes in Excel VBA

为君一笑 提交于 2019-12-30 10:42:11
问题 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 please ? Definition : Private Type SHELLEXECUTEINFO cbSize As Long fMask As Long Hwnd As Long lpVerb As String lpFile As String lpParameters As String lpDirectory As String nShow As Long hInstApp As Long lpIDList As Long lpClass As String hkeyClass As Long

ShellExecuteEx function always returning error code 5 (C++)

假如想象 提交于 2019-12-25 04:19:18
问题 I need to start a process and have access to the PID, so I am trying to use ShellExecuteEx. I am attempting to open a batch file. However, no matter how I pass the parameters and no matter where the file is located and what permission's I have on the file, the function is returning with Error Code 5: Access is denied. The File is located in the same location as the config files that have already been read successfully. The File is set for full access permissions with any user. It does this

Start external app with ShellExecuteEx and wait until it become initialized

蓝咒 提交于 2019-12-18 13:17:36
问题 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 App1.IsRunning then Start(App2); If App2.IsRunning then Start(App3); ......................... If App(N-1).IsRunning then Start(App(N)); Everything works fine but there is a one possible problem: ShellExecuteEx starts the application, and return almost

How to replicate ShellExecuteEx failure with ERROR_NO_ASSOCIATION error?

放肆的年华 提交于 2019-12-13 02:58:04
问题 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 == file:///C:/Users/UserName/AppData/Local/Temp/My_Report.htm SHELLEXECUTEINFO sei = {0}; sei.cbSize = sizeof(sei); sei.fMask = SEE_MASK_FLAG_NO_UI; sei.nShow = SW_SHOW; sei.lpVerb = L"open"; sei.lpFile = strCmd.GetBuffer(); sei.hwnd = hParentWnd; BOOL bInitialized

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

假装没事ソ 提交于 2019-12-11 02:23:48
问题 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 method ( such as xcopy) because I need the windows shell function undo/redo after performing shell-item-specific actions. It's not documented at all in the microsoft msdn library. I've tried to fill the 'lpfile' parameter with a list of items such as