yogger Posted April 25, 2006 Posted April 25, 2006 Is there a way to set environment variables (specificaly temp) other than using the 'set' command through startnet.cmd?I'm working on a custom program and I would rather run it with winpeshl.ini than leave startnet open
Albuquerque Posted April 25, 2006 Posted April 25, 2006 Sure; one of two ways:Method One: Manual processOpen up REGEDIT on your computer, click on HKEY_LOCAL_MACHINE, click on the File menu, click on Load Hive... Browse to the folder where you have your PE files, go into the I386\System32\Config folder. Double click on the "Default" file, give it a name of zzz_default when it prompts.Expand the zzz_default key, click on the Environment key, double-click the TEMP value in the right pane and fill in your requested path. When finished, go back to the left pane tree view, click again on zzz_default, and now you can click File and Unload Hive.Method two: Automated processGo into your actual PE build files where all the ODK stuff is actually stored. Double-click on the file named "Winpedef.inf" and it should open in Notepad. Under the [AddReg] section, copy in the following line:HKCU,"Environment", "TEMP", REG_EXPAND_SZ, "<temppathyouwant"Save the INF file. Next time you build a PE image with your MKIMG command, that registry key will automatically insert itself. Obviously this doesn't "fix" any existing PE images you've already built.
yogger Posted April 25, 2006 Author Posted April 25, 2006 Thanks. I am trying method one, I have all the files on my HD, full control of the files, and read only turned off but I get an error opening key. Am I doing something wrong?I can't try method two right now because I don't have access to the original files, I'm taking over someones position and don't have time to rebuild from scratch (just start and they want something next week....)
Albuquerque Posted April 25, 2006 Posted April 25, 2006 What is the error you receive when trying to open the default file with Regedit?
yogger Posted April 25, 2006 Author Posted April 25, 2006 What is the error you receive when trying to open the default file with Regedit?I'm able to open it in regedit and it shows up under hklm. But when i click on it I get a message: "cannot open zzz_default: error while opening key"
Albuquerque Posted April 25, 2006 Posted April 25, 2006 What operating system are you using? Does any other process have that file open?
yogger Posted April 25, 2006 Author Posted April 25, 2006 I figured it out. the permissions on the key were borked. I redid the iso and tried to run my app, but it's still erroring out until i manually do a set command. I double checked the registry hive and both temp and tmp point to where i want them but nothing shows up when i do a set.
allen2 Posted April 26, 2006 Posted April 26, 2006 Try to set the reg keys here: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\EnvironmentThis should solve your problem. To add some value, before burning your iso, do:-launch regedit- go to HKEY_LOCAL_MACHINE- do file, load hive, select setupreg.hiv which should be in I386\system32 folder- set a name as you like for example sys.- now go to HKEY_LOCAL_MACHINE\SYS\ControlSet001\Control\Session Manager\Environment- add the value like Albuquerque described.
yogger Posted April 26, 2006 Author Posted April 26, 2006 Try to set the reg keys here: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\EnvironmentThis should solve your problem. To add some value, before burning your iso, do:-launch regedit- go to HKEY_LOCAL_MACHINE- do file, load hive, select setupreg.hiv which should be in I386\system32 folder- set a name as you like for example sys.- now go to HKEY_LOCAL_MACHINE\SYS\ControlSet001\Control\Session Manager\Environment- add the value like Albuquerque described.Thank you, that did the trick.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now