Sign in to follow this  
Followers 0
Innovative

File unlocking

6 posts in this topic

I've seen some applications on the net that 'unlock' files even if some other programs are using the file to solve "Access is denied!" problems..

Is that possible in autoit ?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I don't think that kind of thing is possible AutoIt native.

I've been looking into Dll calls in the kernel32.dll for:

DuplicateHandle

CloseHandle

And maybe one or two more I can't remember.

I've never done dllcalls before, so I failed miserly this time ofcourse.

Maybe you or someone else dares to go there?

Edit: Type...

P.S.

I also just saw this tread:

http://www.autoitscript.com/forum/index.ph...&hl=dllcall

Might be very interresting in this case!

Edited by Triblade

My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

Share this post


Link to post
Share on other sites

Any others have any other solution for this ?

Share this post


Link to post
Share on other sites

The way I know that other applications delete open files is by adding them to a list that should be deleted on next startup. You can write an autoit script to run on startup that will delete the file when it is not open anymore or at the next startup (save the filename(s) in a temp file).

Unlock is also sometimes possible by removing the read-only attribute see the help on FileSetAttrib


In the beginning there was nothing and then even that exploded - anonymous

Share this post


Link to post
Share on other sites

Hey FYI... http://www.autoitscript.com/forum/index.ph...c=69047&hl=

That conversation was only a little while ago. Not sure if he doesn't want to see it included in the autoit installer or even in example scripts.


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0