Solved

Executing WinExec from a Win32 windows service

Posted on 2008-10-07
1
476 Views
Last Modified: 2013-11-20
I have been encountering a querky bug when executing WinExec from my win32 windows service. I am attempting to open IE Explorer 6 with the following command,

retCode = ::WinExec(command.c_str(), SW_SHOWNORMAL);
// The variable command contains the following value = "C:\\Program Files\\Internet Explorer\\iexplore" https:\\x.x.x.x

...but when I execute this, it starts iexplore in the task manager, but no browser opens up. Anyone have any thoughts on this? Very Urgent!!
T
0
Comment
Question by:rronec1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
Naveen_R earned 500 total points
ID: 22665695
This is because your service dosent have desktop interactivity permission. Right click on the service in the serive console window, take properties of your service-> Take Log on tab. In this tab, you can find a check box called "Allow service to interact with desktop". Enbale that option and try again.

One more thing I need to mention is that, you should not use WinExec function. It is provided only for compatibility with 16-bit Windows. Better use ShellExecute() function or CreateProcess() function.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question