Openwindow() question
Openwindow() question
Hi all,
Is it possible to open and display a window without having to login to a Windows XP machine? i.e. at the login prompt.
Is it possible to open and display a window without having to login to a Windows XP machine? i.e. at the login prompt.
Hi,
The OpenWindow command doesnt have any relation to your question.
You basicly ask if you can do this:
1. compile a program with PureBasic .
or
1. get any program you wish to run
2. find a method in windows how to run that program you selected in the login startup.
That i dont know but your question has no relation to Purebasic, its a system configuration and with that i cant help you that much.
google is your friend.
The OpenWindow command doesnt have any relation to your question.
You basicly ask if you can do this:
1. compile a program with PureBasic .
or
1. get any program you wish to run
2. find a method in windows how to run that program you selected in the login startup.
That i dont know but your question has no relation to Purebasic, its a system configuration and with that i cant help you that much.
google is your friend.
Newbie (?) just because I don't spend my time submitting posts doesn't make me a newbie.
Anyway, to try and clarify what I am asking as some seem to be getting a bit confused.
I want to run a program as a service, which I can do with no problems, but I have seen some apps that can display a window where you can control this service without anyone having to be logged into that machine. So all you have to do is switch on an XP (professional) machine and the service takes over from there.
I thought that what I had asked for before was self explanatory
Anyway, to try and clarify what I am asking as some seem to be getting a bit confused.
I want to run a program as a service, which I can do with no problems, but I have seen some apps that can display a window where you can control this service without anyone having to be logged into that machine. So all you have to do is switch on an XP (professional) machine and the service takes over from there.
I thought that what I had asked for before was self explanatory
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Trond,
When I said it was self explanatory I meant "my question", If I already knew the answer do you really think I would have asked the question?
Secondaly, when the service runs, no window is displayed ( do you really think I didn't try this?) hense the question
Thirdly, To create a service perhaps you should look at PBOSL and look for the exellent Library by Rings.
But there is one helpfull thing you did, you reminded me of what a hostile board this can be for someone looking for some genuine help. Even though there are many helpfull people on this board there are always some who spoil it for everyone else.
If you have no help to offer then why do people respond with wise cracks and insults
When I said it was self explanatory I meant "my question", If I already knew the answer do you really think I would have asked the question?
Secondaly, when the service runs, no window is displayed ( do you really think I didn't try this?) hense the question
Thirdly, To create a service perhaps you should look at PBOSL and look for the exellent Library by Rings.
But there is one helpfull thing you did, you reminded me of what a hostile board this can be for someone looking for some genuine help. Even though there are many helpfull people on this board there are always some who spoil it for everyone else.
If you have no help to offer then why do people respond with wise cracks and insults
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
If no window shows, how can you be sure the service is running?nessie wrote:Thirdly, To create a service perhaps you should look at PBOSL and look for the exellent Library by Rings.
Edit: What is the result of the OpenWindow() command? Does it return a valid window handle? (You can check this with IsWindow_().)
Edit again:
Try to put this at the top of the program:
Code: Select all
#WINSTA_ALL = #WINSTA_WRITEATTRIBUTES | #WINSTA_READSCREEN | #WINSTA_EXITWINDOWS | #WINSTA_ENUMERATE | #WINSTA_ENUMDESKTOPS | #WINSTA_ACCESSCLIPBOARD | #WINSTA_ACCESSGLOBALATOMS | #WINSTA_CREATEDESKTOP
#DESKTOP_ALL = #DESKTOP_WRITEOBJECTS | #DESKTOP_SWITCHDESKTOP | #DESKTOP_READOBJECTS | #DESKTOP_JOURNALRECORD | #DESKTOP_JOURNALPLAYBACK | #DESKTOP_HOOKCONTROL | #DESKTOP_ENUMERATE | #DESKTOP_CREATEWINDOW | #DESKTOP_CREATEMENU
WindowStation = OpenWindowStation_("WinSta0", 1, #WINSTA_ALL)
SetProcessWindowStation_(WindowStation)
Desktop = OpenDesktop_("Winlogon", 0, 1, #DESKTOP_ALL)
SetThreadDesktop_(Desktop)
And this at the end:
Code: Select all
CloseDesktop_(Desktop)
CloseWindowStation_(WindowStation)
Trond,
I tried your code, but it didn't work as there is no-one logged into the pc. I'll try and explain better.
When I turn on an XP proffessional desktop which is a member of a domain, it boots up to a login prompt. The service I have written runs and connects to a streaming media server. This part all works fine and I can hear it playing from the pc. I want to display a window with a button on it which tells them that a broadcast is taking place and allows someone to stop it playing without having to login.
I can get it to play at a certain time and stop after a certain time, but I just can't get the window to appear. I have only ever seen one application that can do this, so there has to be away. Thanks for trying anyway.
I tried your code, but it didn't work as there is no-one logged into the pc. I'll try and explain better.
When I turn on an XP proffessional desktop which is a member of a domain, it boots up to a login prompt. The service I have written runs and connects to a streaming media server. This part all works fine and I can hear it playing from the pc. I want to display a window with a button on it which tells them that a broadcast is taking place and allows someone to stop it playing without having to login.
I can get it to play at a certain time and stop after a certain time, but I just can't get the window to appear. I have only ever seen one application that can do this, so there has to be away. Thanks for trying anyway.
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada