monter Posted August 12, 2006 Posted August 12, 2006 Hello Here is another problem - ProcessClose() works properly in Windows 98 - it closes _every_ process which I write in this command. But if I switch to Windows XP - none of services wants to close by ProcessClose() Try by yourself - by holding Ctrl+Alt+Del - Task manager - in my system there are processes: KERNEL32.DLL=0 MSGSRV32.EXE=0 SPOOL32.EXE=0 MPREXE.EXE=0 MSTASK.EXE=0 R_SERVER.EXE=0 KPF4SS.EXE=0 ASHSERV.EXE=2 PROXYPLUS.EXE=1 LEXBCES.EXE=1 RPCSS.EXE=0 LEXPPS.EXE=0 KPF4GUI.EXE=0 mmtask.tsk=0 SYSTRAYX.EXE=0 EXPLORER.EXE=0 TASKMON.EXE=0 SMAX4PNP.EXE=0 SYSTRAY.EXE=0 FPDISP5A.EXE=1 USBMONIT.EXE=1 MAILSERVER.EXE=0 TCLOCK.EXE=0 TOTALCMD.EXE=1 SERVER.EXE=1 GUILDFTPD.EXE=1 WMIEXE.EXE=0 DDHELP.EXE=0 THUNDERBIRD.EXE=3 FIREFOX.EXE=3 SYSCLOSE.EXE=0 Where the result is "1" my AU3 script tries to "close process" by ProcessClose() and (Returns 1 regardless of success/failure.) InWin 98 it always works, but in Win XP - I noticed - _always_ fails... all the services. How can I kill services in AutoIt3? I still have a German DOS-like program like kill.exe and I All right. Nobody move. I got a AutoIt 3.2.0 here, and I'm not afraid to use it. monter.FM [font="Tahoma;"]Full programs:[/font][font="'Microsoft Sans Serif';"] LogOnOff - keeps alive user session, after set time it performs logoff (instead of locking [acronym="Personal Computer"]PC[/acronym], useful in some corporations working with [acronym="Active Directory"]AD[/acronym]).[/font] ČharCönvěr - character set converter. [font="'Microsoft Sans Serif';"]CDTray - automated opening/closing the [acronym="Compact Disc"]CD[/acronym] tray.[/font] [font="'Microsoft Sans Serif';"]Example scripts: [/font][font="'Microsoft Sans Serif';"]RecentFolders - managing recently used folder list with combobox.[/font] [font="'Microsoft Sans Serif';"]AutoUpdater - periodic auto-checking, auto-updating and auto-relaunching newest script version.[/font] Changed host from monter.homeip.net to monter.homenet.org - replace address in my scripts to get back them to work.
PsaltyDS Posted August 12, 2006 Posted August 12, 2006 (edited) Hello Here is another problem - ProcessClose() works properly in Windows 98 - it closes _every_ process which I write in this command. But if I switch to Windows XP - none of services wants to close by ProcessClose() Try by yourself - by holding Ctrl+Alt+Del - Task manager - in my system there are processes: KERNEL32.DLL=0 MSGSRV32.EXE=0 SPOOL32.EXE=0 MPREXE.EXE=0 MSTASK.EXE=0 R_SERVER.EXE=0 KPF4SS.EXE=0 ASHSERV.EXE=2 PROXYPLUS.EXE=1 LEXBCES.EXE=1 RPCSS.EXE=0 LEXPPS.EXE=0 KPF4GUI.EXE=0 mmtask.tsk=0 SYSTRAYX.EXE=0 EXPLORER.EXE=0 TASKMON.EXE=0 SMAX4PNP.EXE=0 SYSTRAY.EXE=0 FPDISP5A.EXE=1 USBMONIT.EXE=1 MAILSERVER.EXE=0 TCLOCK.EXE=0 TOTALCMD.EXE=1 SERVER.EXE=1 GUILDFTPD.EXE=1 WMIEXE.EXE=0 DDHELP.EXE=0 THUNDERBIRD.EXE=3 FIREFOX.EXE=3 SYSCLOSE.EXE=0 Where the result is "1" my AU3 script tries to "close process" by ProcessClose() and (Returns 1 regardless of success/failure.) InWin 98 it always works, but in Win XP - I noticed - _always_ fails... all the services. How can I kill services in AutoIt3? I still have a German DOS-like program like kill.exe and I All right. Nobody move. I got a AutoIt 3.2.0 here, and I'm not afraid to use it. Hmm... When I do that, I get: top - 20:20:59 up 10:05, 3 users, load average: 0.06, 0.13, 0.10 Tasks: 72 total, 1 running, 71 sleeping, 0 stopped, 0 zombie Cpu(s): 4.0% us, 1.5% sy, 0.0% ni, 94.0% id, 0.5% wa, 0.0% hi, 0.0% si Mem: 515784k total, 509544k used, 6240k free, 85248k buffers Swap: 1052248k total, 0k used, 1052248k free, 292088k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4911 root 15 0 71316 18m 3100 S 3.1 3.7 24:24.47 X 7473 psaltyds 15 0 29848 15m 12m S 2.1 3.1 0:02.00 konsole 7245 psaltyds 15 0 85680 42m 22m S 0.2 8.4 3:59.49 firefox-bin 5659 psaltyds 16 0 24968 10m 9044 S 0.1 2.2 0:00.34 ksmserver 5669 psaltyds 16 0 25552 11m 9.8m S 0.1 2.4 0:09.32 klipper 7487 psaltyds 16 0 2112 988 768 R 0.1 0.2 0:00.02 top 1 root 16 0 692 260 224 S 0.0 0.1 0:01.83 init 2 root 34 19 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/0 3 root 10 -5 0 0 0 S 0.0 0.0 0:00.12 events/0 4 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 khelper 5 root 10 -5 0 0 0 S 0.0 0.0 0:00.00 kthread 11 root 20 -5 0 0 0 S 0.0 0.0 0:00.00 kacpid ...but all seriousness aside... If the processes represent services, did you try: Run(@ComSpec & ' /c NET STOP "' & $ServiceName & '"', @TempDir)oÝ÷ Ù.q©Þ½éàzÛ-jÛ¬m§$jëh×6$RetCode = RunWait(@ComSpec & ' /c NET STOP "' & $ServiceName & '"', @TempDir) If $RetCode = 0 Then MsgBox(64, "Info", "Stopping service " & $ServiceName & " succeeded.") Else MsgBox(16, "Info", "Stopping service " & $ServiceName & " failed! ErrorLevel = " & $RetCode) EndIf Edited August 12, 2006 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now