Jump to content

change environment path in combination with junction


Recommended Posts

in Vista the default environment path has changed to (non-spaced path)

C:\Users\Appdata

C:Programs

and so on

How does I could achieved this within unattended XP setup,

Winnt.sif has setting for %UserProfile%, %Programfiles% %Windir% %temp% and Common files but not appdata path (i think? :angel )

My objective is make XP directory structure like Vista's

From above I miss how to set APPDATA & LOCAL SETTINGS, can I inject some .reg or reg.exe comand? If I do, when?

and after that I need to create junction using fsutil.exe for compatibility (as XP default) also in unattended mode

Is that possible? :wacko:

Thanx in advance

Sorry about my english

Link to comment
Share on other sites


Oops, sorry its linkd.exe not fsutil.exe as stated in http://support.microsoft.com/kb/205524

BTW I tried myself and it works

Now I have

%programfiles% as C:\Programs (kept in registry)

"C:\Programs" junction-ed to "C:\program files"

and so on.. like in Vista when you enable "show hidden and system files"

but still I don't know how to change:

Application Data > AppData

Local Settings > Local

during setup.... :no:

if this solved it would be great and resolve space-contained path on many software. like compiler...

for example: put it all inside C:\Programs while maintaining compatibility with some ignorant installer that use C:\Program Files instead of %programfiles%

Or probably I could junction a folder outside C: (ex. D:\Software) to C:\Programs instead while having %programfiles% registered as C:\Programs junction it again to C:\Program Files for compatibility

In the end it could have Appdata, MyDocument, Temp and Program Files in wherever you want right after Windows setup finished. And will looks more like UNIX :)

I think :angel

HELP....HELP.... :wacko:

Link to comment
Share on other sites

  • 2 weeks later...

OK I did it...

Setting that works

C:\Program Files >> C:\Programs

C:\Program Files\Common Files >> C:\Programs\Commons

C:\Document and Settings >> C:\User

C:\Document and Settings\All Users >> C:\User\Public

C:\Document and Settings\Default User >> C:\User\Default

C:\Document and Settings\"username"\Application Data >> C:\User\"username"\AppData

C:\Document and Settings\"username"\Local Settings >> C:\User\"username"\Locals

C:\Document and Settings\"username"\Local Settings\Temp >> C:\User\"username"\Locals\Temp

Setting that not works

"Start Menu" unable to migrate to "StartMenu" as Windows keep complaining, anyway its not important :)

Tools needed linkd.exe (find it in MS Restoolkit 2003) (put in OEM or as integrated) and executed at initial svcpack

no more namespace problems :)

PS: junction and (hardlink) is "similar" to symlink in UNIX and not shortcut

More..

I'm still wish able to junction 3 folder: programfiles, temp, and appdata (i think impossible) out from C: since they tend to grow out in size and keep system C: as small partition. how to do that? assuming I have prepare the partition... ah driveletter problem

Link to comment
Share on other sites

You should know something about it.

I also tried to move out of my C drive some folders, with junction, so I then could use Deep Freeze to get a virus-proof system with a usable user account.

The problem with the drive letter is something I couldn't solve completely. It has given me headaches for months but I think it's possible to automate it all.

I started my project of a Windows XP CD containing the latest updates and installing unattended ready to freeze, with separated partitions for system and user files.

I had no luck in learning to use diskpart scripts. That might interest you. It's located in system32. PD: You can download Junction from sysinternals. It's a MUST HAVE program for every system admin.

[ I'm still trying to get my XP SP3 source updated ... windows update it's not helping a lot ]

I started this project by different parts at the same time.

I had a Live XP that loaded partition magic for me. That was -theorically- the only stage of setup that wasn't unattended.

Then I wrote some programs in VB so I had winnt.sif configured the way I wanted (machine name, users' profile folders location, etc) that offered a default config and the possibility to change it, and then installed windows the unattended way. It's possible to automate

I had thought about what you want to do. Some time ago I thought about the purpose of the "default user" folder, it MUST be created at some time by Windows Setup, I think it must be created by a hive*.inf file in text mode. I don't have such a powerful computer to use virtual pc to install xp several times until I get that information. and I'm a bit short of time.

Hope all this help you.

Link to comment
Share on other sites

Ahh I changed the default paths to non-spaced ones too hehe. I used an option in Nlite though.

Can't that be simply set from "shell folders" key in the registry? (guessing)

Anyway I decided to change only "Programs", "Documents and Settings","My Documents" and leave alone "Application Data","Local Settings","All Users","Default User" because with tests I found that not all programs use the global paths for them :(

Also be careful if you want to junction folders to secondary drives.. I dunno what could happen if one is missing\has problems (BSOD?)

Edited by phaolo
Link to comment
Share on other sites

"I found that not all programs use the global paths for them"

Well, that the purpose of junction right? put it as windows default path for compatibility.

The physically path (and registered) still C:\Programs but it have C:\Program Files Junction

thanx leass, I'll sure try diskpart..

But do you have a clue about when the script will run? or where to put it?

C:\Programs will be the registered path, D:\ linked to C:\Programs (when it executed?) then C:\Programs linked to C:\Program Files (executed at svcpack) at last D:\ set to not mounted with driveletter just mountpoint (not shown in explorer, just a tought)

I always use C:\Program Files Juctioned to D:\Programs for 5 years, and never got BSOD, probably because i never use AV. :)

And the one i found incompatible with junction was CDRTFE which its underlying mkisofs, and friends are in Cygwin emulation mode. and probably any cygwin ported

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...