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
3 answers

Download and Execute with VBS

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…
Redbutt
  • 13
  • 1
  • 1
  • 2
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…
0
votes
3 answers

is the code given in description is executable in Windows system?

is the code given is executable in Windows system? as it seems to be Linux commands echo 'create database foo2' | mysql -uroot mysqldump --skip-triggers -uroot foo | mysql -uroot foo2 EDITED I am executing the following code but I am not…
OM The Eternity
  • 15,694
  • 44
  • 120
  • 182
0
votes
1 answer

Why does ShellExecute not work?

#include "ShellAPI.h"; ShellExecute(Handle,NULL,"file.txt",NULL,NULL,SW_RESTORE); Why does this code not work? Here the error screen:
GuitarFan
  • 79
  • 2
  • 9
0
votes
0 answers

CreateProcess() and ShellExecute() freeze when waiting for svchost.exe

Under Windows 8 I'm starting an external program but it get stuck as a background process waiting for svchost.exe to return. If I start the same application manually (double click) it starts just fine. If I run the same code under Windows 7, it…
Max Kielland
  • 5,627
  • 9
  • 60
  • 95
0
votes
1 answer

Run tool does not works

When I use Windows Run tool to call my exe with argument it work fine I did below cmd.exe /C "C:\ex\abc.exe" skk Then my exe get a hit and i got skk as an argument. BUt I i did cmd.exe /C "C:\ex\abc.exe" "sk k" then my exe does not call. Why? But…
San
  • 315
  • 1
  • 3
  • 12
0
votes
1 answer

shell_exec returns null ffmpeg for generating video thumb image

I'm using ffmpeg for getting thumbnail image from video. Its working fine. But the shell_exec function returns null. My command is, $return=shell_exec('C:\ffmpeg\bin\ffmpeg.exe -i D:\wamp\www\test\demo.mov -f image2 -vframes 1…
Manu
  • 137
  • 1
  • 12
0
votes
2 answers

How can I run a cscript as administrator with another vbscript?

I can use CreateObject("shell.application").ShellExecute but can I run a cscript as administrator? using that? I'm kind of a newbie vbscripter. Thanks!
pigun17
  • 31
  • 4
0
votes
0 answers

ShellExecute fails to open VLC although music file exists

I use ShellExecute from Delphi to open VLC media player to play songs. Sometimes it works and sometimes it fails (For one song it works and for most doesn't). When it fails it displays a few msgs (for each failure) - notifying that it failed to open…
0
votes
1 answer

Perfom a ShellExecute from Firefox Addon

In my Firefox extensions I want to open certain files with the "default viewer" for that file type in Windows. So basically something similar to the ShellExecute('OPEN') function call of the Windows API. Is it possible? If so, how can that be…
Chris
  • 127
  • 1
  • 8
0
votes
0 answers

Suppress the save alert message while printing an excel document using ShellExecute

I'm writing a C++ code with WINAPI() and I need to print many excel documents by using the ShellExecute() function as shown below: ShellExecute(NULL,"print","c:\\printdocs\\test1.xls",NULL,NULL,SW_SHOWNORMAL); The above command works fine and…
balusingam
  • 1
  • 1
  • 2
0
votes
2 answers

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

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…
JLarrimore
  • 169
  • 1
  • 2
  • 16
0
votes
3 answers

Chaining multiple ShellExecute calls

Consider the following code and its executable - runner.exe: #include #include #include using namespace std; int main(int argc, char *argv[]) { SHELLEXECUTEINFO shExecInfo; shExecInfo.cbSize =…
IVlad
  • 43,099
  • 13
  • 111
  • 179
0
votes
1 answer

ShellExecute raises type mismatch error when trying to open a file

I am trying to automate a .application file to open automatically on an end users machine. The code I found online says to do this: Dim my_file my_file = "c:/location/example.application" ShellExecute 0, vbNullString, my_file, vbNullString,…
JMQRSQ
  • 1
  • 1
0
votes
1 answer

How to add parameter to Internet Explorer using ShellExecute

I am writing a simple console application in C++, that connects my Android tablet with PC. To do so, I have to type "\\192.168.1.5" into Internet Explorer (doesn't work anywhere else). So I wanted to write a simple application to do it instead of…