Jump to content
Sign in to follow this  
BZU

Force a Directory to be deleted if Some Process/Programs Running From it.

Recommended Posts

BZU

hi,

how to Force a Directory to be deleted if Some Process/Programs are Running From it.

thanx in advance for the help!


OS: Windows XP SP2, AutoIt version: 3.2.10.0Help The Great Forum Which is Used by You For Help.01 - Always Respect The Forum Members.02 - Use Search Before Posting or making any new Thread.03 - Help The Newbies.

Share this post


Link to post
Share on other sites
d4rk

for an example if you can specific the target program :)

$Dir="C:\notepad.exe"
if WinWaitActive("untitle - notepad") then
FileDelete($Dir)
endif

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites
BZU

thanx for the help but i have a virus and its process names are

smss.exe (Same like windows critical process with same name but from different location)

so how can i delete its default dir (@SystemDir & "\Microsoft\RECYCLER\WORM")

Please help me dear ....


OS: Windows XP SP2, AutoIt version: 3.2.10.0Help The Great Forum Which is Used by You For Help.01 - Always Respect The Forum Members.02 - Use Search Before Posting or making any new Thread.03 - Help The Newbies.

Share this post


Link to post
Share on other sites
Jos

for an example if you can specific the target program :)

$Dir="C:\notepad.exe"
if WinWaitActive("untitle - notepad") then
FileDelete($Dir)
endif
mmm.. right ... this does not make sense. :(

@OP: You mean if you can delete a directory when its in-use by a program ?

You cannot as far as I know unless you kill all tasks using it first.


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jos

thanx for the help but i have a virus and its process names are

smss.exe (Same like windows critical process with same name but from different location)

so how can i delete its default dir (@SystemDir & "\Microsoft\RECYCLER\WORM")

Please help me dear ....

You have some infection on your PC ? Get a good AV package.

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
BZU

i can not install any av because virus kills the setup.

that's why i was asking about it.

by the way can u help me to kill its process first and delete its dir ?

i have tried but i could not kill this process.

@Jos

sir, i know u can really help me out.

thanx!


OS: Windows XP SP2, AutoIt version: 3.2.10.0Help The Great Forum Which is Used by You For Help.01 - Always Respect The Forum Members.02 - Use Search Before Posting or making any new Thread.03 - Help The Newbies.

Share this post


Link to post
Share on other sites
Jos

i can not install any av because virus kills the setup.

that's why i was asking about it.

by the way can u help me to kill its process first and delete its dir ?

i have tried but i could not kill this process.

@Jos

sir, i know u can really help me out.

thanx!

You can use the AutoIt3 ProcessClose() or the WindowsXP tskill.exe program to kill a task.

By the way, just start your PC in SafeMode and remove the Virus program from your PC and possible remove the registry RUN entries.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
BZU

i know all these tricks but virus have disabled the safe mode.

when i starts safe mode computer restarts before starting anything.

any other solution please.......


OS: Windows XP SP2, AutoIt version: 3.2.10.0Help The Great Forum Which is Used by You For Help.01 - Always Respect The Forum Members.02 - Use Search Before Posting or making any new Thread.03 - Help The Newbies.

Share this post


Link to post
Share on other sites
Jos

i know all these tricks but virus have disabled the safe mode.

when i starts safe mode computer restarts before starting anything.

any other solution please.......

mmm disabled safemode... that a new one for me.

So you are not able to Kill that processes ?

You can always boot from a CD to gain access to the drive.

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
BZU

ok , thanx!

it means autoit fails to solve this problem.

thanx again.


OS: Windows XP SP2, AutoIt version: 3.2.10.0Help The Great Forum Which is Used by You For Help.01 - Always Respect The Forum Members.02 - Use Search Before Posting or making any new Thread.03 - Help The Newbies.

Share this post


Link to post
Share on other sites
Drew

i know all these tricks but virus have disabled the safe mode.

when i starts safe mode computer restarts before starting anything.

any other solution please.......

Surprised this virus allows you to speak of it. O_O.

ok , thanx!

it means autoit fails to solve this problem.

thanx again.

And no , I'd be willing to bet there would be a way AutoIt could help... just the intuition and will to put the language to use may lack.

Share this post


Link to post
Share on other sites
BZU

mmm disabled safemode... that a new one for me.

So you are not able to Kill that processes ?

You can always boot from a CD to gain access to the drive.

i have found the solution to enable or disable safe mode here.

http://guino.home.insightbb.com/nosafemode.html

is it still new to you ?


OS: Windows XP SP2, AutoIt version: 3.2.10.0Help The Great Forum Which is Used by You For Help.01 - Always Respect The Forum Members.02 - Use Search Before Posting or making any new Thread.03 - Help The Newbies.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×