How to copy file into WindowsTemp folder rather than User temp folder
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
Regards,
WSP
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
Regards,
WSP
0 Comments
[ + ] Show comments
Answers (7)
Please log in to answer
Posted by:
Jsaylor
14 years ago
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.
Posted by:
WSPPackager
14 years ago
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
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
Posted by:
Jsaylor
14 years ago
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.
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.
Posted by:
WSPPackager
14 years ago
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.
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.
Posted by:
AngelD
14 years ago
Posted by:
anonymous_9363
14 years ago
Posted by:
t_claydon
14 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.