Jump to content

redirecting favorites and my documents


Recommended Posts

edit:: go to this post for the working version and an added bonus :)http://board.MSFN.org/index.php?showtopic=...=10entry64339

!!!! this post doesnt work see link above for the working version!!!!

save this in your $OEM$\$1\install folder as folders.inf and edit the [strings] to your preference.. make sure you create the folders

[Version]
Signature=$CHICAGO$

[DefaultInstall]
AddReg=Reg.Settings

[Reg.Settings]
HKCU,Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders,Personal,0x20000,"%PERSONAL%"
HKCU,Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders,My Pictures,0x20000,"%PICTURES%"
HKCU,Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders,favorites,0x20000,"%FAVORITES%"

[Strings]
PERSONAL="D:\\Numinous\My Documents"
PICTURES="D:\\Numinous\My Documents\My Pictures"
FAVORITES="D:\\Numinous\Favorites"

add this to the top of your main_batch.cmd

ECHO.
ECHO Redirecting folders...
RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 128 %systemdrive%\install\folders.inf

if you want to use it right away right-click folders.inf and select install then reboot

Link to comment
Share on other sites


No offense, but my first suggestion would be to try your ideas before you post them. Every post I've seen you make lately you haven't tested out, and then you just repost saying that something went wrong. It's best to find out something works FIRST, then tell everyone.

Link to comment
Share on other sites

you must be referring to the redirecting of folders.. only thing ive had trouble with.. :D unless you can prove me wrong :rolleyes: ..ill post then test promptly like i always do.. helps if someone can make a suggestion before testing ..this is a forum my friend not a guide ..did you have a second suggestion?? ..all three of your statements say exactly the same thing only worded different lol :) go flyakite.. no offense

Link to comment
Share on other sites

anyone got an idea?? ..the inf came from microsoft themselves.. it must be my rundll32 command causeing it.. if i put this in a cmd and run it, it works, but on install it does but dont.. as far as i can see everythings right ..even read msdn on the rundll32 command 3 times and still see no problem.. im ready to test but still see nothing to change :)

Link to comment
Share on other sites

ok you win :D ill use a reg file :D:rolleyes:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders]
"Personal"="D:\\Numinous\My Documents"
"Pictures"="D:\\Numinous\My Documents\My Pictures"
"Favorites"="D:\\Numinous\Favorites"

now to test it :)

Link to comment
Share on other sites

I think the reason it freezes is because after rundll32.exe is done, it doesn't terminate itself. It continues to stay resident in memory until the process is killed, either by the user or by the system. I could be wrong, which is most likely. :) But it's something to think about.

Link to comment
Share on other sites

@numinous.

I totally agree that this is a forum and not a guide shop.

for a lot of members and a lot of interest not mainy people actually really contribute to an evolving process such as the hive.inf as you are at the minute.

My expertise is very limited so I only like to offer a comment when I have a vague idea what i am talking about.

Keep up your postings and ideas!

Link to comment
Share on other sites

i totally agree.. i dont profess to be a professor but at least im having a go :)

im gonna try this in the hives again.. ive got a hunch :rolleyes: got a feeling im gonna be reinstalling all day lol

im guessing the rundll32 command actually terminated the process cause it promptly moved on to hotfixes.. hmm its own cmd :D ..i think ive got it.. gonna test this hives theory first though

thanks tosk :D think you put me on the right track

Link to comment
Share on other sites

There are some programs which let You change the direction of Your Favorites.

I took a regshot before and one after. Here is the comparison.

Before;

HKEY_USERS\XXX\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites: "C:\Documents and Settings\XXX\Favoriter\"

HKEY_USERS\XXX\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Favorites: "C:\Documents and Settings\XXX\Favoriter\"

After;

HKEY_USERS\XXX\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Favorites: "C:\Test"

HKEY_USERS\XXX\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Favorites: "C:\Test"

And it worked just fine. The question is if this works when changed with a regfile?

Just a simple suggestion/question from

/SwedenXP :)

Link to comment
Share on other sites

if you can change

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\*

the data is copied adding a user and to

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\*

wondering if theres a way to change the %USERPROFILE% variable to something like

d:\numinous

hive didnt work again so im trying this theory::

[GuiRunOnce]

Command0="rundll32 setupapi.dll,InstallHinfSection DefaultInstall 128 %systemdrive%\install\folders.inf"

in winnt.sif

anyone ?? ideas ??

would this work in cmdlines.txt ..im guessing it would

or should i be looking at HKU's .Default user profile ..hmmm

im gonna have to slow down and take a few steps back on this one.. totally confusing

Link to comment
Share on other sites

success.. :) ..no need to back up My Documents or Favorites folders before a reinstall and no need to repopulate them after.. everythings exactly where you left it.. open up internet explorer after a fresh install and all your Favorites are there untouched :rolleyes: same goes for My Documents

save this in your $OEM$\$1\install folder as folders.inf and edit the [strings] to your preference.. make sure you create the folders

[Version]
Signature=$CHICAGO$

[DefaultInstall]
AddReg=Reg.Settings

[Reg.Settings]
HKCU,Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders,Personal,0x20000,"%PERSONAL%"
HKCU,Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders,My Pictures,0x20000,"%PICTURES%"
HKCU,Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders,favorites,0x20000,"%FAVORITES%"

[Strings]
PERSONAL="D:\\Numinous\My Documents"
PICTURES="D:\\Numinous\My Documents\My Pictures"
FAVORITES="D:\\Numinous\Favorites"

add this as the first command in your [GuiRunOnce] section in winnt.sif

Command0="rundll32 setupapi.dll,InstallHinfSection DefaultInstall 128 %systemdrive%\install\folders.inf"

if you want to use it right away right-click folders.inf, select install, then reboot ..the folders should exist before you do this

:D

theres other folders you can redirect with this or maybe throw in some reg hacks.. can also redirect to a network folder using "\\Server\Share\Numinous\Favorites" for example

!!! warning !!! redirecting folders will not work when adding a user in main_batch.cmd as [GuiRunOnce] section is run after the first user logs in ..use cmdlines.txt to add your user name

working here no probs but still open to suggestions for this subject!!

Link to comment
Share on other sites

heres another option for this.. browse hivedef.inf in the i386 distribution folder and grab a load of settings from there if you want your hive files intact... for example copy this lot and paste them in your folders.inf under the [Reg.Settings] section

HKCU,"Control Panel\Desktop","ActiveWndTrkTimeout",0x00010003,0x00000000
HKCU,"Control Panel\Desktop","AutoEndTasks",0x00000002,"0"
HKCU,"Control Panel\Desktop","CaretWidth",0x00010003,0x00000001
HKCU,"Control Panel\Desktop","CoolSwitch",0x00000002,"1"
HKCU,"Control Panel\Desktop","CoolSwitchColumns",0x00000002,"7"
HKCU,"Control Panel\Desktop","CoolSwitchRows",0x00000002,"3"
HKCU,"Control Panel\Desktop","CursorBlinkRate",0x00000002,"530"
HKCU,"Control Panel\Desktop","DragFullWindows",0x00000002,"2"
HKCU,"Control Panel\Desktop","DragHeight",0x00000000,"4"
HKCU,"Control Panel\Desktop","DragWidth",0x00000000,"4"
HKCU,"Control Panel\Desktop","FontSmoothing",0x00000002,"2"
HKCU,"Control Panel\Desktop","FontSmoothingOrientation",0x00010003,0x00000001
HKCU,"Control Panel\Desktop","FontSmoothingType",0x00010003,0x00000001
HKCU,"Control Panel\Desktop","ForegroundFlashCount",0x00010003,0x00000003
HKCU,"Control Panel\Desktop","ForegroundLockTimeout",0x00010003,0x00030d40
HKCU,"Control Panel\Desktop","GridGranularity",0x00000002,"0"
HKCU,"Control Panel\Desktop","HungAppTimeout",0x00000002,"5000"
HKCU,"Control Panel\Desktop","LowPowerActive",0x00000002,"0"
HKCU,"Control Panel\Desktop","LowPowerTimeOut",0x00000002,"0"
HKCU,"Control Panel\Desktop","MenuShowDelay",0x00000002,"400"
HKCU,"Control Panel\Desktop","PaintDesktopVersion",0x00010003,0x00000000
HKCU,"Control Panel\Desktop","Pattern",0x00000002,"%NONE%"
HKCU,"Control Panel\Desktop","PowerOffActive",0x00000002,"0"
HKCU,"Control Panel\Desktop","PowerOffTimeOut",0x00000002,"0"
HKCU,"Control Panel\Desktop","ScreenSaverIsSecure",0x00000002,"0"
HKCU,"Control Panel\Desktop","ScreenSaveTimeOut",0x00000000,"600"
HKCU,"Control Panel\Desktop","ScreenSaveActive",0x00000002,"1"
HKCU,"Control Panel\Desktop","SCRNSAVE.EXE",0x00000002,"%SystemRoot%\System32\logon.scr"
HKCU,"Control Panel\Desktop","TileWallpaper",0x00000002,"0"

make it compatible with your inf file by removing any unneeded exclamation marks (not sure if this needs to be done)

HKCU,Control Panel\Desktop,ActiveWndTrkTimeout,0x00010003,0x00000000
HKCU,Control Panel\Desktop,AutoEndTasks,0x00000002,"0"
HKCU,Control Panel\Desktop,CaretWidth,0x00010003,0x00000001
HKCU,Control Panel\Desktop,CoolSwitch,0x00000002,"1"
HKCU,Control Panel\Desktop,CoolSwitchColumns,0x00000002,"7"
HKCU,Control Panel\Desktop,CoolSwitchRows,0x00000002,"3"
HKCU,Control Panel\Desktop,CursorBlinkRate,0x00000002,"530"
HKCU,Control Panel\Desktop,DragFullWindows,0x00000002,"2"
HKCU,Control Panel\Desktop,DragHeight,0x00000000,"4"
HKCU,Control Panel\Desktop,DragWidth,0x00000000,"4"
HKCU,Control Panel\Desktop,FontSmoothing,0x00000002,"2"
HKCU,Control Panel\Desktop,FontSmoothingOrientation,0x00010003,0x00000001
HKCU,Control Panel\Desktop,FontSmoothingType,0x00010003,0x00000001
HKCU,Control Panel\Desktop,ForegroundFlashCount,0x00010003,0x00000003
HKCU,Control Panel\Desktop,ForegroundLockTimeout,0x00010003,0x00030d40
HKCU,Control Panel\Desktop,GridGranularity,0x00000002,"0"
HKCU,Control Panel\Desktop,HungAppTimeout,0x00000002,"5000"
HKCU,Control Panel\Desktop,LowPowerActive,0x00000002,"0"
HKCU,Control Panel\Desktop,LowPowerTimeOut,0x00000002,"0"
HKCU,Control Panel\Desktop,MenuShowDelay,0x00000002,"400"
HKCU,Control Panel\Desktop,PaintDesktopVersion,0x00010003,0x00000000
HKCU,Control Panel\Desktop,Pattern,0x00000002,"%NONE%"
HKCU,Control Panel\Desktop,PowerOffActive,0x00000002,"0"
HKCU,Control Panel\Desktop,PowerOffTimeOut,0x00000002,"0"
HKCU,Control Panel\Desktop,ScreenSaverIsSecure,0x00000002,"0"
HKCU,Control Panel\Desktop,ScreenSaveTimeOut,0x00000000,"600"
HKCU,Control Panel\Desktop,ScreenSaveActive,0x00000002,"1"
HKCU,Control Panel\Desktop,SCRNSAVE.EXE,0x00000002,"%SystemRoot%\System32\logon.scr"
HKCU,Control Panel\Desktop,TileWallpaper,0x00000002,"0"

the flag 0x00000002 will not overwrite existing data

use 0x00000000

the same for 0x00010003

use 0x00010001

edit away :rolleyes:

right-click the inf, install and reboot to test

probably better testing on a slightly smaller scale :D

backup your reg before though!!! could be horrendous lol :)

Link to comment
Share on other sites

heres a tried and tested example inf

[Version]
Signature=$CHICAGO$

[DefaultInstall]
AddReg=HKCU.Settings
AddReg=HKLM.Settings

; ROOT,SUBKEY[,NAME[,FLAG[,DATA]]]
;
; FLAG:
;
; 0x00000 - REG_SZ
; 0x00001 - REG_BINARY
; 0x10000 - REG_MULTI_SZ
; 0x20000 - REG_EXPAND_SZ
; 0x10001 - REG_DWORD
; 0x20001 - REG_NONE

[HKCU.Settings]
;
; redirect special folders
;
HKCU,Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders,Personal,0x20000,"%PERSONAL%"
HKCU,Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders,My Pictures,0x20000,"%PICTURES%"
HKCU,Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders,favorites,0x20000,"%FAVORITES%"
;
; change MenuShowDelay
;
HKCU,Control Panel\Desktop,MenuShowDelay,0x00000,"125"


[HKLM.Settings]
;
; dont start MS-Messenger with Outlook Express
;
HKLM,Software\Microsoft\Outlook Express,Hide Messenger,0x10001,0x00000002


[Strings]
PERSONAL="D:\\Numinous\My Documents"
PICTURES="D:\\Numinous\My Documents\My Pictures"
FAVORITES="D:\\Numinous\Favorites"

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...