News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Restarting the Registry

Started by Mincho Georgiev, January 02, 2006, 08:42:46 AM

Previous topic - Next topic

Mincho Georgiev

I've been so sick and tired every time when i make some changes in the registry to perform the usual trick (task mgr -> explorer.exe (kill) -> new task ->explorer.exe) or just restarting. That's way i've made that simple tool,that will terminate and restart the'explorer' process with the new registry settings.
In the example below i'm showing also a way to terminate (and find first of all) a process by a given name.
Thanks for reply!


[attachment deleted by admin]

skywalker

Quote from: shaka_zulu on January 02, 2006, 08:42:46 AM
I've been so sick and tired every time when i make some changes in the registry to perform the usual trick (task mgr -> explorer.exe (kill) -> new task ->explorer.exe) or just restarting. That's way i've made that simple tool,that will terminate and restart the'explorer' process with the new registry settings.
In the example below i'm showing also a way to terminate (and find first of all) a process by a given name.
Thanks for reply!


Thanks.

ramguru

Hi, shaka_zulu with a little efforts of mine I have found onother way to restart windows explorer

.data
terminator1 db "Progman",0
terminator2 db "Explorer.exe",0

...........
mov pid, 0
invoke FindWindow, ADDR terminator1, 0
mov    ecx, eax
invoke GetWindowThreadProcessId, ecx, ADDR pid
.if pid
invoke OpenProcess, PROCESS_TERMINATE, FALSE, pid
mov    handle, eax
.if eax
invoke TerminateProcess, handle, 0
invoke CloseHandle, handle
.endif
.endif
invoke WinExec, ADDR terminator2, SW_SHOW

In addition I have written a little progy which has ability to switch between several desktops (meaning directories). So you're able to store some icons(files) here, some icons there - in 4 dif. places basicaly...
Remember %USERPROFILE%\Desktop is original path (you can restore it whenever you want) in Windows XP

[attachment deleted by admin]

Mincho Georgiev

Hi there ,Ramguru ! I was using  a FindWindow 's Method before too in one of my programs. Very interesting switcher infact!  :U