I would like to know how can i delete a file by creating a MSI ?

file is located in C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files\SQM\


1 Comment   [ + ] Show Comment


  • This is the default profile for *locally created* users, i.e. accounts added to the workstation so, in a corporate environment, who would care what's in there?
Please log in to comment

Community Chosen Answer


I recommend Active Setup as the best way to delete files from user profiles. I just posted a primer on what it is and how it works here: http://www.itninja.com/blog/view/an-active-setup-primer

Answered 11/18/2013 by: bkelly
Red Belt

Please log in to comment



Are we missing something here?

Is the OP asking how to remove something from the default user profile? C:\Users\Default

Therefore AS won't be required as it's just one file location required - unless I've read it all wrong :)

Answered 11/19/2013 by: dunnpy
Red Belt

  • The question is about creating an MSI file in order to delete a file from a user profile path; wouldn't you agree Windows Installer is not the right technology for file removal?
    • I agree that Windows Installer could be the right technology (although it could also be achieved by other methods), I just mean that the path quoted by the OP is the Default User profile path and not 'a user profile' path:


      Meaning that ActiveSetup wouldn't be required as it's just one file location and not a location in every user profile.

      Maybe I've just read the wrong/differently to everyone else :)
      • You are correct dunnpy, I saw AppData and immediately thought profile. In this case Active Setup would probably not work because the default user path is likely protected from a standard user. Any script (batch, VBS, etc) will do the job but it would need to be deployed as an admin (with a systems management system, start up/shut down script, etc.)
Please log in to comment
This content is currently hidden from public view.
Reason: duplicate response
For more information, visit our FAQ's.


Hey there,

take a snapshot with a tool like appdeploy. Then delete the Files. Take a the "after-snapshot". If you have the MSI you can delete the other Tables in the File. With Appdeploy or Orca.


Have Fun.


Answered 11/19/2013 by: Johnzko
Orange Senior Belt

Please log in to comment

Ok thanks for your help, however i also can use vbs  to do that, because i must use a luncher with vbs inside, so i could add a command line like this : 


Set Fso= WScript.CreateObject("Scripting.FileSystemObject" ) 

If Fso.FileExists("C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files\SQM\myfiletodelete") Then 

Set ObjFile = Fso.GetFile("C:\Users\Default\AppData\Local\Microsoft\Windows\Temporary Internet Files\SQM\myfiletodelete") 



yes ?

Answered 11/19/2013 by: tens
Orange Belt

Please log in to comment

I think you would be better off adding something to the logon script to delete the file, as you will have access to the users AppData path at that point. A MSI isnt really ideal for what your trying to achive.

If your not in a domain, so no logon scripts etc. You could add something to the HKLM Run key, this would achive what you require.


In regards to the script, you can use a batch or VB script to do the deleting, if your really fancy you could add some logging in as well.

Answered 11/18/2013 by: rileyz
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity