Jump to content

Making UA Copy Files To My Documents


Recommended Posts

Hi Everybody!

I gotta question for you guys. How do I make the UA installation copy something to My Documents irrespective of which account I use so that for example a song will be copied to My Documents if my default account is "Marthax" but, also if it would be "Something Else". What variable do I have to use in order for it to work?

Regards,

Marthax

Link to comment
Share on other sites


To copy a file:

COPY /Y "X:\Full path to file\filename.ext" "%USERPROFILE%\My Documents"

For copying folders, I prefer to use XCOPY:

XCOPY /E /H /R /Y "X:\full path to folder\" "%USERPROFILE%\My Documents\"

Note the trailing backslashes when copying folders. Let us know if you have any issues with this

Link to comment
Share on other sites

Perhaps I just don't understand this but, I got a problem. I use this to make a SFX copy files to My Documents and it doesn't work. I type "%USERPROFILE%\My Documents" as the extract destination, but it won't work. Should I type $DOCS\%USERPROFILE%\My Documents perhaps?

Link to comment
Share on other sites

@ Mike:

unfortunately that won't work. If you do that, setup will create a folder in Documents and Settings called $userprofile$, which won't accomplish what is desired.

@ Marthax:

Are you using a different My Documents location other than "Documents and Settings\USERNAME\My Documents" ?

Link to comment
Share on other sites

doesn't default user apply to all, even future users? Default user is the base for all future users.... or so I understand.

$OEM$\$Docs\Default User\

I can't remember which site I copy/pasted this from, but I'm pretty sure the link was in the MSFN UA Guide: (Alanoll may know off-hand)

        Customizing the Default User's Profile

Whenever a user profile is created, Windows copies the user profile template, the Default User Profile, to a sub-directory of the Documents and Settings directory, with the name of the user. In order to present each new user with a profile that is customized to our requirements, we must edit this Default User Profile. This is done with relative ease during the GUI section of setup, as the Default User Profile is the active profile, and any changes made to the HKCU section of the registry (the section that determines individual settings) will be saved and perpetuated to all subsequent users.

The two main areas of Profile Customization are the user's visual settings (how the explorer is laid out, quick launch bar, default icon style, etc.) and shortcut creation and placement.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Visual Settings:

------------------

In order to "silently" customize the various visual settings of Explorer and Internet Explorer, we must import the corresponding entries into the registry. These settings, however, are updated by Windows during logoff, and replaced with the user's current settings. During the GUI setup section, we have the unique opportunity to overcome this obstacle. As the explorer shell has not been fully loaded, it does not save it's settings on the first setup logoff. Subsequent logons will all load the shell fully, and will not use the Default User Profile. This is the most convenient point to make the necessary modifications that are to be applied to all users. This can be accomplished using standard .reg files, called from the CMDLINES.TXT file. For more information on using CMDLINES.TXT, look HERE.

Most Interesting Reg Keys 

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main][HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]

_____________________________________________________________________

Shortcuts and other files:

-----------------------------

Windows creates shortcuts in many different places: the start menu, the desktop, the quick launch bar, the sent to directory, and more. Some of these shortcuts are in the user's own profile, while some are in the general system profile (All Users). I prefer to have all start menu shortcuts simple and organized, with only one copy in a central location. For this reason I place all the short cuts in the All Users profile's Start Menu directory, and remove all from the default user's directories. This has the added benefit that non-administrator users cannot inadvertently move or delete these shortcuts. In addition to the Start Menu, the desktop and the favorites directories are available in the All Users Profile. In order to automatically add files to either of these profiles during setup, you may add the files to the "$OEM$\$DOCS\All Users" or "$OEM$\$DOCS\Default User" directories of your distribution, and these will be copied to the correct locations during setup.

As I find the Windows handling of the start menu "messy" at best, I delete the entire start menu from both the default and all user profiles, and then copy my own preconfigured start menu and quick launch shortcuts to the all user and default user profiles, respectively. Unfortunately, deleting all the pre-existing shortcuts prohibits me from using the "$OEM$\$DOCS" directories, so I must copy the shortcuts over after setup has copied the $OEM$ directories.

________________________________________________________________

Replacing the Default User Profile (NTUSER.DAT) with a preconfigured version

------------------------------------------------------------------------------------------

One other option would be to preconfigure both the user settings (NTUSER.DAT) and other files (desktop, quick launch, send to, etc.) and copy these to the new installation. This cannot, however, be done from the GUI section of setup, as these files are in use at this time. The solution would be to automatically boot into the Administrators account after setup has completed, and run the necessary commands to copy these files over the original Default Profile files. The disadvantage of this method is that the administrator account, which was created before the Default User Profile was modified, will not have these settings.

yep- found it in MSFN UACD/DVD Guide

GreenMachine's site

Link to comment
Share on other sites

If I type $OEM$\$Docs\%USERPROFILE%\My Documents\ then WinRAR says that it cannot reach $OEM$\$Docs\C:\Documents and Settings\Marthax\My Documents so that's not correct.. Anyone else know how to fix this?

Link to comment
Share on other sites

If I type $OEM$\$Docs\%USERPROFILE%\My Documents\ then WinRAR says that it cannot reach $OEM$\$Docs\C:\Documents and Settings\Marthax\My Documents so that's not correct.. Anyone else know how to fix this?

It's not a copy command that is being referred to, you need to create a $Docs\Default User folder in your $OEM$ folder and copy the files you need into there, then recreate your UWXPCD, they will then be copied to the My Docs folder on install, you don't need to copy anything...However if you want to do it that way then use COPY /Y "%systemdrive%\install\Docs\filename.ext" "%USERPROFILE%\My Documents. Just make sure you create a Docs folder in the $OEM$\install folder of your UWXPCD

Link to comment
Share on other sites

It's not a copy command that is being referred to, you need to create a $Docs\Default User folder in your $OEM$ folder and copy the files you need into there, then recreate your UWXPCD, they will then be copied to the My Docs folder on install, you don't need to copy anything...

I should have stated this in my post.... thanks for that, Ghostrider.

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