LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Closing Windows XP explorer.exe

Hi,
I like to close and to start the explorer.exe (Windows XP/Professionel) from my LabVIEW application. Is there any possiblity?
Thanks,
Martin
0 Kudos
Message 1 of 6
(3,747 Views)
It's easy to start Window explorer. Just use System Exec.vi (on Communication palette). Enter:
c:\YOUR SYSTEM DIRECTORY\explorer.exe /e, /n, c:\YOUR WORKING DIRCTORY

Closing it might be a little harder. If you know the window title, you can use "Quit Application.vi"
(download wutilt32.zip from NI site).

If you don't the window title, you have to use Window API with Call Library Node.
Fisrt, you have to find it's window handle. Because it's title may vary, it's hard to catch it's handle. Fortunately, it's window class won't change. So you can enumerate all top level windows, and get their
class names, and find the one you want.

If the Window explorer (or any application) was started by you using Window API, it'll be a lot easier
to get the window hanel.

If you don't know much about Window API, drop me a line, I'll send you a VI.

George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 2 of 6
(3,726 Views)
Hi zou,
I meant the explorer.exe process. When you open the task manager than you can close the explorer.exe process. This will close all desk top icons and hide the start task bar. This can restrict user access to the directories. I didn't meant a explorer window, or is this the same procedure to close the explorer?

martin
0 Kudos
Message 3 of 6
(3,717 Views)
I'm not very big on windows internal stuff, but as far as I know, crashing that process is probably the worst way to go about this. Windows is supposed to have some capabalities when it comes to restricting users. Have you tried creating limited user accounts?
Additionally, there are probably some better ways of doing this even without disturbing explorer. For example, the attached VI (7.0) makes a simple call to the windows API to show and hide the taskbar. The same might be applicable to hiding the desktop icons (which aren't there by default, BTW. You have to place them there).
You may also wish to have a look at programs like tweakUI, which is a microsoft tool (if I remember correctly) for changing some less accessible things in windows.

___________________
Try to take over the world!
0 Kudos
Message 4 of 6
(3,704 Views)
hi there

tst is right. and BTW:

- i just stopped the explorer - process by hand in the taskmanager, and ALL running applications stopped also, including LV!
- after i stopped the explorer - process my screen went blank. but i could start the taskmanager and then i'm able to restart the explorer via the task - managers menubar ("New task").


so this method is not applicable, i think.

best regards
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 5 of 6
(3,698 Views)
You can have multiple processes running explorer.exe. However if your Window is setup for single process running explorer.exe, you better not to kill the process, but it's ok to close the explorer window. The process still running in background. The process has multiple threads, the explorer window doesn't belong to the main thread.

However, if you want to prevent user to see taskbar, and desktop icons, you can simply hide the desktop window and the taskbar (window).

George Zou
http://gtoolbox.yeah.net
George Zou
0 Kudos
Message 6 of 6
(3,683 Views)