Welcome, Guest
Username Password: Remember me

How to copy file into WindowsTemp folder rather than User temp folder
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: How to copy file into WindowsTemp folder rather than User temp folder

How to copy file into WindowsTemp folder rather than User temp folder 2 years, 5 months ago #878

  • deployexpert
Hi

I am preparing an MSI from SetupCapture in WSP. File is being captured and placed in Temp folder.

I am having big time trouble though the task looks simple.

I want to copy the file into c:\winnt\temp folder but the file is getting copied into %Temp% folder which is c:\docuements and settings\userid\Local Settings\Temp.

I tried to with ALLUSERS=1 commandline and also with Movetable option in MSI but nothing is working out.

Please help me

Re: How to copy file into WindowsTemp folder rather than User temp folder 2 years, 5 months ago #879

  • applicationPackaging
Have you checked on the TempFolder entry in the Directory table? You should be able to modify the full directory value in that row to whatever temp folder you'd like. Additionally, if you're using the tables to copy files, you should use [TempFolder] instead of %temp% to copy files, that will use the path set in the database, not the environment variable on the target machine.

Re: How to copy file into WindowsTemp folder rather than User temp folder 2 years, 5 months ago #880

  • deployexpert
Hi Jsaylor,

thank you very much for your response.

Below is the directory table row content for TempFolder.

Directory          Directory_Parent    DefaultDir  FullDirectory
"TempFolder"  "WindowsFolder"    ".:Temp"    "Windows\Temp"

I could not able to edit the FullDirectory column. Could you please help me more?

Regards,
WSP

(in reply to Jsaylor)

Re: How to copy file into WindowsTemp folder rather than User temp folder 2 years, 5 months ago #881

  • applicationPackaging
That's what it should look like, if you want it to go to c:\winnt\temp. I would guess that whatever action is copying those files is using the environment variable %temp% instead of the MSI property [tempfolder].

How are you copying the files you want in the system temp folder? With an embedded script in a custom action? If so, you may have to re-evaluate how you're populating those files, and perhaps switch them over to using the native windows installer file copying methods.

For instance, if you're using the tables, you should be able to go to the component table, find the file (or files) that you want copied, and simply change the entry in the Directory_ column to read "TempFolder". That will tell Windows Installer to put that particular file in c:\windows\temp.

Re: How to copy file into WindowsTemp folder rather than User temp folder 2 years, 5 months ago #882

  • deployexpert
I am using the Installation Expert wizard to copy the file. Just added the file in Windows\Temp folder and expected that the file will be copied in to the Windows Temp folder but it is not.

When I looked MSI Log, the component is having the Keypath as %temp% folder path. If we can change this to windows temp folder then I think it will copy into the windows temp folder.

Any thoughts on how to change the KeyPath value for that component.

Re: How to copy file into WindowsTemp folder rather than User temp folder 2 years, 5 months ago #883

  • applicationPackaging
Do you really need those files?
Files located in the temp folder are for the most temporary files.
  • Page:
  • 1
Time to create page: 0.63 seconds

     
    
Home Forum