473,543 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Win32api.Messag eBox

When I use win32api.Messag eBox from the interactive console from an
app that runs at the command line, it works and displays my alert just
fine however when I use it in a service that I built I can hear the
'beep' but the alert does not show and the program seems to stall
waiting for the alert to close, how can I have the alert show so that
the user can see what it says and press the button?
Oct 15 '08 #1
2 6136
Unkwntech a écrit :
When I use win32api.Messag eBox from the interactive console from an
app that runs at the command line, it works and displays my alert just
fine however when I use it in a service that I built I can hear the
'beep' but the alert does not show and the program seems to stall
waiting for the alert to close, how can I have the alert show so that
the user can see what it says and press the button?
I'm by no mean a Win32 expert, but IIRC, Windows 'services' (IOW :
daemons) are not suppose to directly interact with the user. Now you'd
better not take me on words on this...
Oct 15 '08 #2
Bruno Desthuilliers <br************ ********@websit eburo.invalidwr ote:
Unkwntech a écrit :
>When I use win32api.Messag eBox from the interactive console from an
app that runs at the command line, it works and displays my alert just
fine however when I use it in a service that I built I can hear the
'beep' but the alert does not show and the program seems to stall
waiting for the alert to close, how can I have the alert show so that
the user can see what it says and press the button?

I'm by no mean a Win32 expert, but IIRC, Windows 'services' (IOW :
daemons) are not suppose to directly interact with the user. Now you'd
better not take me on words on this...
It's an option when you install the service. By default services will run
under the 'local system' account and have no access to the desktop. You can
either give the service permission to interact with the desktop from the
service properties (or specify --interactive if installing it with
win32serviceuti l).

--
Duncan Booth http://kupuguy.blogspot.com
Oct 15 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
48180
by: Matt Smith | last post by:
hi all, again.... having another problem with python COMs, I run a python script on a win2000 machine, that uses win32com.client and it runs perfectly, whereas when I come to run it on a win98 machine (the machine that the code, when completed, will be running from in the future) it returns the error: Traceback (most recent call last):...
5
7382
by: Gary Richardson | last post by:
I'm trying to use win32api.SetCursorPos() to position the cursor in a Tkinter canvas window. I.e.: from Tkinter import * import win32api root = Tk() canvas = Canvas(root, width=400, height=300, bg='white') canvas.pack() win32api.SetCursorPos(100,100) root.mainloop()
2
1936
by: Nurchi BECHED | last post by:
Hello, my dearest respected brother, All! How do you make calls to Win32Api functions from C# I have an old example in Visual FoxPro... Kind of need to do the same in C# now... I need to get volume information (as much as possible) I am sure .Net Framework has already got something to do with it, but I am also interested (in learning...
6
2240
by: purity | last post by:
This is what I'm trying to do (written totally different but you'll get the point) HINSTANCE user32 = NULL; FARPROC mbox = NULL; user32=LoadLibrary("User32.dll"); //user32 now is i.e 0x77D10000 //I know messagebox is located at offset 0x77D31236 ( which is user32+ 0x21236 );
2
2792
by: Jim | last post by:
I am trying to figure out how to embed Python in a little C++ Windows console app. Here's the code: // Py_Initialize(); Py_InitializeEx(0); PyRun_SimpleString("from win32com.client import *"); Here's what it does on the last line: File "D:\Python\Lib\site-packages\win32com\__init__.py", line 5, in ?
0
3806
by: Mike | last post by:
Hi. I have Python 2.4 installed on my local machine in c:\Python24. I have also downloaded the python for windows extensions installer pywin32-208.win32-py2.4.exe and installed this to C:\Python24\Lib\site-packages Trying to run a python script through a C# console app is causing me problems: the last line of code in the following block...
1
6194
by: reginpc | last post by:
Hi, Please anyone say how to find win32api.py file and where its present?? i am Getting the below error... from win32com.shell import shell File "C:\Python25\Lib\site-packages\win32com\__init__.py", line 5, in <module> import win32api, sys, os ImportError: No module named win32api
1
1902
by: tkpmep | last post by:
I'm running Python 2.5.2 on Windows XP and need to interface with R, so I downloaded the R 2.6.2 statistical package and installed it, and did the same for RPy 1.02 (i made sure I got the version for Python 2.5 and R 2.62.). When I go to the Python command line and type I get the following error message: Traceback (most recent call last):...
1
2815
by: Michiel Overtoom | last post by:
On Saturday 19 July 2008 21:13:04 Lamonte Harris wrote: What are the actions you do and the commands you give, and what is the precise error you get? Greetings, -- "The ability of the OSS process to collect and harness
0
7412
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7355
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7594
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7697
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4899
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3394
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
979
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
648
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.