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

Unable to open URL using CreateProcess() in VC++

I'm trying to write a code snippet to open a URL in google chrome from my VC++ application code, while my system's default browser continues to be Internet Explorer only. // Existing VC++ Code used in application to open the URL in Internet…
user3556154
  • 3
  • 1
  • 3
0
votes
1 answer

Shellexecute in vb6 is not working in windows7

Shellexecute() is not working in windows7 When i tried to open some URL from the code, it throws an errror. It returns a value 5. Please some one look into this issue and help me to resolve
Sesha
  • 11
  • 1
  • 2
0
votes
0 answers

C# ShellExecute on windows 2012r2 incorrect work

I have irritating problem and can't solve it 30+ hours. Please help me because there is a Friday evening and I'd like to go home. What's a problem? My service tries to invoke action for file via ShellExecuteA function but action doesn't invoked.…
0
votes
1 answer

The process appears to be deadlocked.All threads have stopped working

In my application I have one service which is launching one exe. In service code I am launching exe with ShellExecuteEx command as : BOOL bLaunched = false; SHELLEXECUTEINFO ex; memset(&ex, 0, sizeof(ex)); ex.cbSize =…
anand
  • 11,071
  • 28
  • 101
  • 159
0
votes
1 answer

ShellExecute isn't opening an HTML file

ShellExecute(NULL, TEXT("open"), TEXT("report\index.html"), NULL, NULL, SW_SHOWNORMAL); Above is my line of code and I, for some reason, cannot get the file to open. Below are all the lines I have tried. ShellExecute(NULL, TEXT("open"),…
War Gravy
  • 1,543
  • 3
  • 20
  • 32
0
votes
2 answers

How to run a programme from MySQL?

mysql > path_to_bin/name.exe Is there a solution?
user198729
  • 61,774
  • 108
  • 250
  • 348
0
votes
1 answer

Custom Run Dialog Input

How would I go about starting a Run Dialog window and having my application input a command to start Steam? I would like my application to open the standard windows run dialog pre-filled with input. This is what I have tried: HINSTANCE…
Quaxton Hale
  • 2,460
  • 5
  • 40
  • 71
0
votes
1 answer

Using ShellExecuteEx to open an executable, also specifying an lpClass?

I have read this and understand lpClass can be used to fix the "wrong file extension issue". However, when I am reading the following lines of code, I can't figure out what lpClass is used for when opening an executable file. //code excerpt from…
kennyzx
  • 12,845
  • 6
  • 39
  • 83
0
votes
1 answer

TShellExecuteInfo lpParameters and ">" symbol

This code calls Sqlite3.exe to do a database backup, but its not working because of the ">" symbol in the parameters. Can you tell me how to fix it? procedure TfAdmin.DoDBBackup(ADBBackupFile: String); var b, p, q: String; ps:…
Steve F
  • 1,527
  • 1
  • 29
  • 55
0
votes
0 answers

C# Process Start runs new Internet Explorer instance with file path converted into url

I have the absolute path of internet explorer executable and the absolute path of an xml file, and i want to open that xml using IE. The code i wrote works fine if there aren't any instance of IE already opened. If there is an IE instance opened, IE…
Nicola
  • 1
  • 1
0
votes
6 answers

How to run ant command through java program?

I want to run a simple ant -v command through a java program. After searching, I came to a point where I know I have to use shell execute instead of process, since ant is not really an exe format. I have a program that works for executing simple…
MePunekar
  • 155
  • 1
  • 5
  • 11
0
votes
1 answer

Python win32api doesn't work in Apache 2.2

I've got a problem printing. I'm using the win32 API: win32api.ShellExecute (0, "print", myfile, None, ".", 0) This works just fine if I don't run Django through apache but when I use apache it doesn't work. I don't get an error just nothing in the…
blackat
  • 23
  • 1
  • 5
0
votes
0 answers

How can I verify a program that I opened using ShellExecute is ready to receive keyboard input?

I am currently working on writing a simple program to automatically update Firefox using Firefox's built in update service (accessed from menu -> help -> about). I am opening Firefox using ShellExecute and sending the keystrokes 'Alt + h' and 'a' to…
JoshFire311
  • 171
  • 7
0
votes
0 answers

Open a text file passing path

I'v tried to use this code to open a text file in my program, but nothing is happening. ShellExecute(NULL, "open", filename, NULL, NULL, SW_SHOW); Note that system.start() is not working either.
Nick Spot
  • 257
  • 2
  • 4
  • 12
0
votes
0 answers

Does ShellExecute have memory leak?

I'm learning C++. When I call _run_file("otherapp.exe",""), current app's memory raise up 1MB. Is any memory leak here? If have, how to fix it? Thank you very much! void _run_file(LPSTR file, LPSTR params) { …