Questions tagged [shellexecute]

ShellExecute is a Win32 API function used to launch document files

ShellExecute is a Microsoft Win32 API function used to launch document files.

Depending on the type of document file, it will do this through:

  • Creating a process using the executable file associated with the specified document
  • Using the COM subsystem to request a shell extension to launch the document
  • Initiating an action to be completed by the end-user, such as a search

As a rule of thumb, it can be assumed that invoking ShellExecute on a document file will have the same result as double-clicking on that file in Windows Explorer, including displaying user interface elements.

521 questions
0
votes
1 answer

Display directory from delphi

I would like to display the contents of a directory using DOS commands from Delphi(7). Using Win10 - 64 The following program displays the DOS shell but does not display the directory contents. What is wrong with my code ? unit…
user1530405
  • 447
  • 1
  • 8
  • 16
0
votes
2 answers

Delphi 10.1 ShellExecute Error incompatible types 'HWND' and 'TWindowsHandle'

I have a problem with the following code in Delphi 10.1: ShellExecute(handle,'open',PChar(filename), '','',SW_SHOWNORMAL); When I try to run the code it gives me this error: Incompatible Types: 'HWND' and 'TWindowHandle'
Crytox
  • 9
  • 1
  • 3
0
votes
1 answer

How to call a PHP file properly using shell script?

How to call a PHP from another server using shell script? I have a PHP file and a shell script, the 2 files are stored in different server. I have this Shell script: #!/bin/bash php "http://example.com/csv_import.php" But when I run this command…
User014019
  • 1,215
  • 8
  • 34
  • 66
0
votes
1 answer

How to force open file "silently" (minimized, not active) using c++ WinAPI functional?

In my WinAPI C++ application I am trying to open an audio file with the default system player using ShellExecuteEx: int OpenFileWithDefaultProgram(const std::wstring& path, int showMode, HANDLE* hProc) { SHELLEXECUTEINFO shInfo; …
sautin1
  • 13
  • 2
0
votes
2 answers

How do I fix "Permission denied" when I try to run an external Perl script?

system("logscr.ply "); The error I get is this: Can't exec "logscr.ply": Permission denied at eal.ply line 3 Why am I getting the error, and how do I fix it?
Hick
  • 35,524
  • 46
  • 151
  • 243
0
votes
3 answers

shell_exec phpfile

I currently use this code: if(isset($_POST['url']) && isset($_POST['trefwoorden']) ) { mysql_connect('localhost', 'crawler', 'whathasbeenseencannotbeunseen'); mysql_select_db("crawler"); mysql_query("INSERT INTO jobs (jobID, url, trefwoorden)…
user443346
0
votes
1 answer

ShellExecute , How I can Tell my project that the application is closed ?

If I call ShellExecute from my delphi application, how can I determine if that program that I called is done, so that I may return to my app and do some other stuff after that other program is done. For Example, open notepad , after done and close…
K.MuS
  • 141
  • 1
  • 10
0
votes
6 answers

execute python file- No such file or directory

I try to execute python file through the terminal with ssh (the file itself is not in my computer). I do the following: ./playg.py and I get: ": No such file or directory" I am in the right directory for sure (when I write cat playg.py I can see…
sara8
  • 199
  • 3
  • 11
0
votes
0 answers

Delphi: Calling an executable from soap dll (IIS)

A SOAP DLL got an API to execute an exe file that is located on a different folder. I use ShellExecute to do so including the path+name and params. ShellExecute returns 42 (>32, which is an OK code) but the executable is not running (it's a command…
Amos
  • 1,321
  • 2
  • 23
  • 44
0
votes
0 answers

Start a process with a different parent process

In myApplication.exe I call ShellExecute to start another process, let's say OtherApplication.exe. In OtherApplication.exe, I'm noticing that it is failing to spawn it's own processes, for example cmd.exe to do some tasks. If I run…
ikathegreat
  • 2,311
  • 9
  • 49
  • 80
0
votes
0 answers

Migrating from system() to a shellexecute() command problems

How can pass from this instruction; string copyDir = "copy \"%AppData%\\..\\Local\\Google\\Chrome\\User Data\\" + chromeX[count] + "\\Login Data\" \"%AppData%\\..\\Local" + newLoc; system(copyDir.c_str()); To a ShellExecute()? I have some problem…
aitsu
  • 13
  • 1
  • 6
0
votes
1 answer

How can I execute a jar file included in c++ with a Base64 string without write it on the HDD?

How I can execute a jar file included in my c++ exe file in a Base64 string without write it on the HDD? Is it possibile execute it from memory or something like this without have 2 files on the HDD? Thanks in advance
user4015351
0
votes
1 answer

How to run Filemaker using fmp:// cmd?

I have a Filemaker v14 database that executes a compiled AutoIt script. It does things that Filemaker can't, then returns a fmp:// url (initiating a Filemaker script by parameters from the url). But I can't figure out how to send that url from an…
onefish
  • 95
  • 1
  • 9
0
votes
3 answers

PHP read command from file and run it

I have a unix command written in a file and I need PHP to read it and execute it. The reason it needs to be read from a file is because the commands symbols mess up the script when put them directly in it. So far I have this:
nosedive25
  • 2,477
  • 5
  • 30
  • 45
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