shabador Posted January 14, 2005 Share Posted January 14, 2005 As the title says. Is it possible to change the location of the TMP and Temp variables before installation?I want to be able to move them all to, say E:/tmp/ without having to go through the registry manually after the installation.I've checked around in the Hivedef.ini and other hives. I only found one listing, changed that, but it didn't work. Temp was still located in C:/Windows/Temp and D:/Documents and Settings/xxxx/... (I've used winnt.sif to change userdir location)I've thought about adding regtweaks that are installed post-install, but I'd rather try to get it done in the middle of installation. Link to comment Share on other sites More sharing options...
MCT Posted January 14, 2005 Share Posted January 14, 2005 u can add reg tweaks in the .inf files or during T-12 Link to comment Share on other sites More sharing options...
shabador Posted January 14, 2005 Author Share Posted January 14, 2005 True. But I'm not certain about what regtweaks that will be needed to change all temp variables to another destination.If someone has done this before, it would be great if they posted what they did to make it happen.Isn't those variables supposed to be located in the i386 folder somewhere? Hive seemed to be the most likely place, but I couldn't find the correct place to edit. Link to comment Share on other sites More sharing options...
OcTroN Posted January 14, 2005 Share Posted January 14, 2005 You should find it here;My Computer -> Properties -> Advanced -> Environment VariablesHere you can set it.Good luck!Thanks for translation MCT ! Link to comment Share on other sites More sharing options...
shabador Posted January 14, 2005 Author Share Posted January 14, 2005 I know that, but I need to change them before I have the ability to go to My Computer Properties. I'm talking about doing this unattended, during the installation preferably.Also: If you change the variables in the path you specify, not all of the temporary files are created in the new place. There are still numerous listings in the registry that points to the old location. Link to comment Share on other sites More sharing options...
MCT Posted January 14, 2005 Share Posted January 14, 2005 ''Omgevingsvariablen"is translated to "Environment Variables" Link to comment Share on other sites More sharing options...
gunsmokingman Posted January 14, 2005 Share Posted January 14, 2005 That set the tmp location to there than it returns the normal tmp variblesecho offclsmode con: Cols=55 Lines=5color 1fSETLOCALmkdir %systemdrive%\123mkdir %systemdrive%\123set tmp=%systemdrive%\123set temp=%systemdrive%\abcecho %tmp%echo.echo %temp%set /p = Here Are The Temp DirENDLOCAL Link to comment Share on other sites More sharing options...
Tsunami Posted January 14, 2005 Share Posted January 14, 2005 @gunsmokingman: your commands will only work for that batch file, it's not permament. This however is:[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment]"TEMP"="temp directory here""TMP"="temp directory here"This will only change the Windows\Temp directory though, not the user variable (which is set to %UserProfile%\Local Settings\Temp). Link to comment Share on other sites More sharing options...
shabador Posted January 14, 2005 Author Share Posted January 14, 2005 Thanks for the regkey, Tsunami. But as you said. That does not work for the user variable.It is propably possible to export out all the user variables and append them on a new install... But that is not what I would like to achieve. There must be a way to edit this in one of the files on the XPCD. These environment settings must (logically) be created by something.But sadly it seems like the solution is buried deep withing the files of i386... Link to comment Share on other sites More sharing options...
fedek9001 Posted January 14, 2005 Share Posted January 14, 2005 I am using this code to do the job :start /wait %SystemRoot%\system32\setenv -m TEMP C:\Temp\Admin\Tempstart /wait %SystemRoot%\system32\setenv -m TMP C:\Temp\Admin\Tempmkdir %systemdrive%\Temp\Admin\Tempstart /wait %SystemRoot%\system32\setenv -u TEMP C:\Temp\Admin\Tempstart /wait %SystemRoot%\system32\setenv -u TMP C:\Temp\Admin\TempYou can find this prog here :http://barnyard.syr.edu/~vefatica/#SETENVbye Link to comment Share on other sites More sharing options...
shabador Posted January 14, 2005 Author Share Posted January 14, 2005 Thank you very much. It's not what I wanted the most, but this is the second best solution. Thanks again. Link to comment Share on other sites More sharing options...
Tsunami Posted January 14, 2005 Share Posted January 14, 2005 Here we go. A quick search in the registry revealed where the user variables are stored:[HKEY_CURRENT_USER\Environment]"TEMP"="temp directory here" Link to comment Share on other sites More sharing options...
shabador Posted January 14, 2005 Author Share Posted January 14, 2005 Continue searching. There are a couple of more places to edit. (I know about them, I've editet them manually before...)Anyway. I think fedek9001's solution is the best one I've encountered if there is no possibility to edit one of the files in i386.And fedek... You can combine some of the syntaxes on setenv. So you only need this.md E:/Tempsetenv -umd temp E:/Tempsetenv -umd tmp E:/Temp Link to comment Share on other sites More sharing options...
Yzöwl Posted January 14, 2005 Share Posted January 14, 2005 I think the registry keys you are after are in HKEY_USERS\.DEFAULT,They are created as type REG_EXPAND_SZ, for the environment variables they use. To set them at their default values or any other using environment variables you could do it with a batch type command:HKU\.DEFAULT\Environment /v TEMP /t REG_EXPAND_SZ /d "%USERPROFILE%\Local Settings\Temp" /fHKU\.DEFAULT\Environment /v TMP /t REG_EXPAND_SZ /d "%USERPROFILE%\Local Settings\Temp" /fIf you dont need environment variables in the location, you could use a normal reg file containing:[HKEY_USERS\.DEFAULT\Environment]"TEMP"="E:\Temp"[HKEY_USERS\.DEFAULT\Environment]"TMP"="E:\Temp"If you wanted to just use the same location as Windows temp you could use the batch method above the reg or also an inf, by adding one of these:CMDHKU\.DEFAULT\Environment /v TEMP /t REG_EXPAND_SZ /d "%SystemRoot%\Temp" /fHKU\.DEFAULT\Environment /v TMP /t REG_EXPAND_SZ /d "%SystemRoot%\Temp" /fINFHKU,.DEFAULT\Environment,TEMP,0x20000,"%10%\Temp"HKU,.DEFAULT\Environment,TMP,0x20000,"%10%\Temp"It would probably need installing at T13 /T12 from cmdlines.txt or equivalent Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now