shellexecute

ShellExecute failing if spaces in Path

别来无恙 提交于 2021-02-07 14:56:55
问题 I have a Delphi application that uses ShellExecute to call a second Delphi Application on a button press. The applications are stored on the same server, on the same network share. Their paths are in the format: const JobManager = 'Z:\Apps\Application 1\Application1.exe'; FeeManager = 'Z:\Apps\Application 2\Application2.exe'; The call to ShellExecute is made as follows: rh := FindWindow(PChar('TMF'), PChar('Edit Job Details')); if rh = 0 then begin ShellExecute(Handle, 'open', JobManager, nil

Delphi 7 - ShellExecute command not working in situations

限于喜欢 提交于 2021-02-07 10:37:17
问题 I have made a Game Launcher and I use this command: procedure TFMain.ImgBtn1Click(Sender: TObject); begin ShellExecute(TForm(Owner).Handle, nil, 'starter.exe', '-lang rus', nil, SW_SHOWNORMAL); end; with '-lang rus' as a parameter. Everything works fine. The Game Launches and the language is in russian(if i put '-lang eng' it still works fine and the game is in english). The starter.exe application is inside a folder named '' bin ''. When i want to relocate the launcher outside this folder i

Debugging Inno Setup installer that respawns itself

允我心安 提交于 2021-02-07 10:33:16
问题 As it can be seen from this question we start a new instance of Inno Setup: Instance := ShellExecute(0, '', ExpandConstant('{srcexe}'), Params, '', SW_SHOW); where function ShellExecute(hwnd: HWND; lpOperation: string; lpFile: string; lpParameters: string; lpDirectory: string; nShowCmd: Integer): THandle; external 'ShellExecuteW@shell32.dll stdcall'; All the code from this question's answer I moved to the VCL_Styles.iss file and included it into my main script. The problem is that after I've

How to call ShellExecute to open a file with specific program using C++ without associating same file extensions

好久不见. 提交于 2021-02-05 12:38:46
问题 I read MSDN and tried this line of code ShellExecute(handle, "open", "fully_qualified_path_to_file", NULL, NULL, SW_SHOWNORMAL); It works fine, but I need some more functionality. I wrote an app, which makes output in file with .bin extension. On my OS .bin files doesn't associated with any specific program. MSDN says that I can associate all .bin files with my app with programming, but this case is unacceptable for me. How I can add this line of code to open specific file with specific

How to call ShellExecute to open a file with specific program using C++ without associating same file extensions

懵懂的女人 提交于 2021-02-05 12:38:46
问题 I read MSDN and tried this line of code ShellExecute(handle, "open", "fully_qualified_path_to_file", NULL, NULL, SW_SHOWNORMAL); It works fine, but I need some more functionality. I wrote an app, which makes output in file with .bin extension. On my OS .bin files doesn't associated with any specific program. MSDN says that I can associate all .bin files with my app with programming, but this case is unacceptable for me. How I can add this line of code to open specific file with specific

How to call ShellExecute to open a file with specific program using C++ without associating same file extensions

点点圈 提交于 2021-02-05 12:38:06
问题 I read MSDN and tried this line of code ShellExecute(handle, "open", "fully_qualified_path_to_file", NULL, NULL, SW_SHOWNORMAL); It works fine, but I need some more functionality. I wrote an app, which makes output in file with .bin extension. On my OS .bin files doesn't associated with any specific program. MSDN says that I can associate all .bin files with my app with programming, but this case is unacceptable for me. How I can add this line of code to open specific file with specific

How to call ShellExecute to open a file with specific program using C++ without associating same file extensions

你离开我真会死。 提交于 2021-02-05 12:37:58
问题 I read MSDN and tried this line of code ShellExecute(handle, "open", "fully_qualified_path_to_file", NULL, NULL, SW_SHOWNORMAL); It works fine, but I need some more functionality. I wrote an app, which makes output in file with .bin extension. On my OS .bin files doesn't associated with any specific program. MSDN says that I can associate all .bin files with my app with programming, but this case is unacceptable for me. How I can add this line of code to open specific file with specific

Download and Execute with VBS

穿精又带淫゛_ 提交于 2021-01-29 18:39:48
问题 I am trying to write a simple VBS script to download and execute a file. From wireshark I can verify that the file is being retrieved form the webserver, but it is not getting executed upon download. I am getting a "Invalid Character" on the "Execute" line. What am I doing wrong? Set x=CreateObject("Microsoft.XMLHTTP") x.Open "GET","http://website/file.exe",False x.Send Execute x.responseText I would also like to remove the "If-Modified-Since" header from the GET request. 回答1: You aren't

Handle for ShellExecute() - Parent Window?

寵の児 提交于 2021-01-27 11:28:50
问题 I am trying to use ShellExecute to open a file in Excel. I was reading about the function on MSDN forums, and I found the folowing information about the handle, which is the first parameter: "hwnd [in] A handle to the owner window used for displaying a user interface (UI) or error messages. This value can be NULL if the operation is not associated with a window." I have also heard this referred to as the handle to the parent window. What is the parent/owner window? As you see below I am using

Python's win32api only printing to default printer

♀尐吖头ヾ 提交于 2020-12-05 11:13:36
问题 I'm trying to use win32api to output a PDF document to a particular printer. win32api.ShellExecute(0, "print", filename, '/d:"%s"' % printername, ".", 0) filename is a full pathname to the file, and printname is the name of the target printer I get by going through the output of win32api.EnumPrinters(6) . The file is sent to the Windows default printer even if printername is the name of a different target (my expectation is that passing a specific printer would send the named file to that