Sign in to follow this  
Followers 0
zenode

Delayed File Delete or Move

2 posts in this topic

I have been trying to use Autoit to perform a delayed file delete or move using the registry key:

HKLM\System\Currentcontrolset\Control\Session Manager","PendingFileRenameOperations"

The OS on which I'm attempting to perform the operation is Windows XP SP3. I have seen some references to this and have duplicated the syntax exatcly but for some reason it doesn't appear to work. Below is a sample of the code I'm using:

RegWrite("HKLM\System\Currentcontrolset\Control\Session Manager","PendingFileRenameOperations","REG_EXPAND_SZ","\??\d:\xxx.txt" &@CRLF & "!\??\d:\yyy.txt" &@CRLF)

I found a function in the Winbatch language intcontrol(30) that performs this exact function which works everytime. I used the winbatch function to create the key value. Exported the key value and examined the results with a bianary viewer. Then I created the regkey value using Autoit. Exported the key value and examined the results with a binary viewer. They were identical. Yet the Key Value created using the Winbatch function worked and the Key Value created using the AutoIt code above does not. This seems very straight forward so I'm wondering if there is more going on than just this key value. Any help is appreciated.

Share this post


Link to post
Share on other sites



RegWrite("HKLM\System\Currentcontrolset\Control\Session Manager","PendingFileRenameOperations","REG_EXPAND_SZ","\??\d:\xxx.txt" &@CRLF & "!\??\d:\yyy.txt" &@CRLF)

Welcome to the forums.

You need to change @CRLF to @LF. (See the Help file entry for RegWrite)

What is the purpose of the exclamation mark in the destination string?


[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

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