Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Executing WinExec from a Win32 windows service

Posted on 2008-10-07
1
Medium Priority
?
512 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 2000 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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…
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.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

704 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