When I run this as a limited user, I get an ACCESS_DENIED message.
Do I have to take off the R and H attributes first?

Thanks.


.DATA

File2Del db "C:\Documents and Settings\Administrator\Local Settings\History\History.IE5"

.CODE


start:

invoke MoveFileEx,addr File2Del,NULL,MOVEFILE_DELAY_UNTIL_REBOOT
Posted on 2010-04-03 16:04:07 by skywalker
You have to run it as administrator... a few ways to get the user to apply his creds when launching are as follows:

- use "runas" with ShellExecute(Ex) windows api command (windows api used  )
- use a manifest (it's a xml file or exe resource) with requireAdministrator embe (or other require rules)
- naming the program Install.exe (or setup or update) (bad  )
- right-click "Run as administrator" (user action  )
- windows registry hack ( bad bad bad )

(Not my list)
Posted on 2010-04-03 16:23:38 by JimmyClif
I am getting error_filename_exceed_range with this.

I thought Windows had have paths up to 32,000 characters.



File1    db "C:\Documents and Settings\Administrator\Local Settings\History\History.IE5\index.dat"
File2    db "C:\Documents and Settings\Administrator\Local Settings\History\History.IE5\index.dat"
File3    db "C:\Documents and Settings\Administrator\Local Settings\History\History.IE5\MSHist012010033020100331\index.dat"
File4    db "C:\Documents and Settings\LocalService\Local Settings\History\History.IE5\index.dat"

.CODE


start:

invoke SetFileAttributes, offset File1,FILE_ATTRIBUTE_NORMAL
invoke DeleteFile, offset File1

Posted on 2010-04-03 21:31:53 by skywalker
How about ,0 after the filename :)
Posted on 2010-04-03 22:57:14 by JimmyClif

How about ,0 after the filename :)


Thanks JimmyClif.

I just about got this puppy trained.
This file won't go bye bye even when run as an admin.

Is this a file that is undeletable except from safe mode?



File4    db "C:\Documents and Settings\LocalService\Local Settings\History\History.IE5\index.dat",0     
invoke MoveFileEx,addr File4,NULL,MOVEFILE_DELAY_UNTIL_REBOOT

Posted on 2010-04-04 09:28:49 by skywalker
Have you tried using unlocker on the index.dat before trying to delete it?  That might help.
Posted on 2010-04-04 10:06:40 by Gunner

Have you tried using unlocker on the index.dat before trying to delete it?  That might help.


Index.dat in LocalService\Local Settings can only be deleted in Safe Mode which I did.

It creates another one, but there is no history in the new one.
About the only reason I have I.E. is because I have to use it for getting updates.

Andy

Posted on 2010-04-04 14:07:34 by skywalker


About the only reason I have I.E. is because I have to use it for getting updates.

Yeah, unfortunately me to.  Have to keep it for the updates.
Posted on 2010-04-04 18:46:39 by Gunner

You have to run it as administrator... a few ways to get the user to apply his creds when launching are as follows:

- use "runas" with ShellExecute(Ex) windows api command (windows api used  )
- use a manifest (it's a xml file or exe resource) with requireAdministrator embe (or other require rules)
- naming the program Install.exe (or setup or update) (bad  )
- right-click "Run as administrator" (user action  )
- windows registry hack ( bad bad bad )

(Not my list)


Have some questions regarding your suggestions.

With my Limited User acct., I can run 95% of what an admin can do.

I am an optimist. If I work at it, I think I can reach 99%. :-)

Can you give me some details on the "manifest" suggestion

In regards to naming program Install.exe etc., does that work?

Registry hacks O.K. I thinks it's o.k. to live dangerously ever once in a Blue Moon.

Andy


Posted on 2010-04-13 20:58:29 by skywalker