Video Screencast Help
New Company Name and Logo Announced. Learn More.

Un-install without TEMP environment variable

Created: 08 Sep 2010 • Updated: 12 Oct 2010 | 2 comments

Hello Experts,

I've been working on the installation as well as un-installation part of one of the products. During un-installation, I need to extract few files to temporary location. The current approach I am using is to look for TEMP environment variable and copy those files over there and at the end cleanup.

Now, my question is, if TEMP environment variable is not present on the target machine, I have to create some temp folder at certain location (right now, I am creating it at C:\) and extract those files at this location. Although, it works, is there any descent way of handling this scenario.

What is the usual way most of the systems work when there is no TEMP environment variable defined?


Comments 2 CommentsJump to latest comment

EdT's picture

I would consider a system to be broken if it does not have a TEMP environment variable set. Your approach of creating your own temp folder is really the only valid solution, and ideally you should delete the content and remove the folder once your uninstall is complete.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

wancsho's picture

As said by EDT, there should not be any issue related to non-presence of TEMP folder on the system but suppose if it happens, then the best alternative is to dump the files at any location on the system , secondly  copy the files to the destination and atlast delete the files using the script during un-installation.