Sinisterly
[AutoIt]Restart explorer - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Coding (https://sinister.li/Forum-Coding--71)
+--- Thread: [AutoIt]Restart explorer (/Thread-AutoIt-Restart-explorer)

Pages: 1 2


[AutoIt]Restart explorer - 1234hotmaster - 11-25-2011

Code:
Run("explorer.exe",Call(ProcessClose("explorer.exe")))

Just gonna say if you can do that in 1 line of code in other languages Tongue


RE: [AutoIt]Restart explorer - ReaperX - 11-25-2011

AutoIt Really is great. Smile


RE: [AutoIt]Restart explorer - ArkPhaze - 11-25-2011

There you go, Powershell:
Code:
foreach ($objItm in Get-Process) { If ($objItm.ProcessName -eq "explorer") { kill $objItm.ID } }

One line of code lol Smile

I see you got a couple ideas for AutoIt Scripts from what i've posted though, that's good, nice easy code here.


RE: [AutoIt]Restart explorer - Raziel - 11-26-2011

You can do this in C either. Write your code with no indentation and never hit enter. Smile)


RE: [AutoIt]Restart explorer - ArkPhaze - 11-26-2011

You could do it in perl too if you wanted to.


RE: [AutoIt]Restart explorer - 1234hotmaster - 11-26-2011

no i mean like in 1 function Tongue


RE: [AutoIt]Restart explorer - ArkPhaze - 11-26-2011

Here you go then lol

Powershell:
Code:
stop-process -name "explorer"



RE: [AutoIt]Restart explorer - 1234hotmaster - 11-26-2011

but you just kill explorer.exe in that line and it wont start it again Tongue


RE: [AutoIt]Restart explorer - ArkPhaze - 11-26-2011

No, it starts back up lol trust me

You haven't tested the script that tells me Smile but with powershell it automatically starts the process back up, only for explorer.exe


RE: [AutoIt]Restart explorer - 1234hotmaster - 11-26-2011

(11-26-2011, 08:12 AM)Infinity Wrote: No, it starts back up lol trust me

You haven't tested the script that tells me Smile but with powershell it automatically starts the process back up, only for explorer.exe
Not my fault for knowing nuffin about powershell Biggrin
Can you write a tut for starting to learn and code powershell in the other languages section? Biggrin
btw If you have more than 20-30 threads with [PowerShell] in them the admin will make a powershell section Smile