Solved

Using logon script to save IE favourites, history, my documents, etc

Posted on 2007-04-03
15
278 Views
Last Modified: 2012-06-21
Hi. I just need to know how to use roaming profiles to save users favorites, history, my documents etc.

I want to do this because some of my users are moving around the office and all these settings are currently saved locally on the workstation.

Basically at the moment my user.bat file includes only share drive mappings and printer mappings. Example below:

NeT Use I: \\OC-DC-01\InfoTech
Net use R: \\OC-DC-01\Conference
Net Use M: \\OC-DC-01\Management

adprintx.exe /cd \\OC-DC-01\OC-HP2600

Thanks


0
Comment
Question by:cgru2
  • 8
  • 7
15 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 250 total points
ID: 18848006
xcopy "%userprofile%\Favorites" \\Server\Share\%username%\Favorites
xcopy "%userprofile%\History" \\Server\Share\%username%\History
xcopy "%userprofile%\My Documents" \\Server\Share\%username%\My Documents"

is a "poor-man's" method for doing it...otherwise use roaming profiles...
http://technet2.microsoft.com/WindowsServer/en/library/b41402c2-c982-4bfb-891e-91b47f211e181033.mspx

0
 

Author Comment

by:cgru2
ID: 18848714
Well my users are all roaming users.

Whenever anyone logs in their PC all the network drives get mapped, as well as a drive which is their own drive eg: (W:) LisaSmith, (W:) ChrisG. Here they can save documents and files to be used on any other computer.

On the server side there is a network share where all these profiles are stored.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18854495
So does the above work for you?
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:cgru2
ID: 18886203
No .. it didnt
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18886370
I'm confused then...what's the problem at this point?
0
 

Author Comment

by:cgru2
ID: 18894803
OK

So at the moment I've got my users created in AD. When a user logs on the machine, the Users.bat script is run. The script contains:

Net Use B: \\ServerName\ClientApps\
Net Use K: \\ServerName\Bookings
Net Use T: \\ServerName\Translations
adprintx.exe /cd "\\ServerName1\Samsung ML-2550 Series PCL 6"

And I also have a share drive ("Users Home Drives") on the server's D:\ drive, which contains all my users profile folders. Eg: SmithD, etc.

In these folders I've got another folder called "SmithD's Documents". In there I've got folders such as SmithD's Music, SmithD's Pictures, SmitD's Videos, etc.

What I want to do is I want the IE Favourites to get saved to that folder too.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18894833
So this should do it...no?

if not exist "\\ServerName\Users Home Drives\%username%\Favorites" md "\\ServerName\Users Home Drives\%username%\Favorites"
xcopy "%userprofile%\Favorites" "\\ServerName\Users Home Drives\%username%\Favorites"
if not exist "\\ServerName\Users Home Drives\%username%\History" md "\\ServerName\Users Home Drives\%username%\History"
xcopy "%userprofile%\History" "\\ServerName\Users Home Drives\%username%\History"
if not exist "\\ServerName\Users Home Drives\%username%\My Documents" md "\\ServerName\Users Home Drives\%username%\My Documents"
xcopy "%userprofile%\My Documents" "\\ServerName\Users Home Drives\%username%\My Documents"
0
 

Author Comment

by:cgru2
ID: 18895058
I've tried it. This is how my Users.bat looks like now:

Net Use B: \\OC-DC-01\ClientApps\
Net Use K: \\OC-DC-01\Bookings
Net Use T: \\OC-DC-01\Translations
Net USe N: \\OC-DC-01\Accounts      
Net USe H: \\OC-DC-01\Users\%UserName%
NeT Use I: \\OC-DC-01\InfoTech
Net use R: \\OC-DC-01\Conference
Net Use M: \\OC-DC-01\Management
Net Use X: \\OC-AS-02\DOSIBS
Net Use Z: \\OC-AS-02\OrbitsUpdate

adprintx.exe /cd "\\oc-dc-01\Samsung ML-2550 Series PCL 6"

if not exist "\\OC-DC-01\Users Home Drives\%username%\Favorites" md "\\OC-DC-01\Users Home Drives\%username%\Favorites"
xcopy "%userprofile%\Favorites" "\\OC-DC-01\Users Home Drives\%username%\Favorites"

It's still not creating a Favourites folder in the users share drive...
0
 

Author Comment

by:cgru2
ID: 18895115
Its worked. I replaced Users Home Drives with Users.

But it's got a error.

So now it created a Favorites folder and saves the favorites to it, but when I log in with that username a DOS prompt pops up and it asks me if I want to overwrite the URLs in Favorites.

C:\Documents and Settings\cristiang>xcopy "C:\Documents and Settings\cristiang\F
avorites" "\\OC-DC-01\Users\cristiang\Favorites"
Overwrite \\OC-DC-01\Users\cristiang\Favorites\MSN.com.url (Yes/No/All)? Y

C:\Documents and Settings\cristiang\Favorites\MSN.com.url
Overwrite \\OC-DC-01\Users\cristiang\Favorites\Radio Station Guide.url (Yes/No/A
ll)?Y

After I press "Y" for MSN.com.url and Radio Station Guide.url, the DOS disappears.

Now when I open IE and look in Favorites, the only thing there is MSN.com and Radio Station Guide (which I think are the default Favorites).
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18895116
Hmm - what about placing some pauses and echos in there -what do you see?

Net Use B: \\OC-DC-01\ClientApps\
Net Use K: \\OC-DC-01\Bookings
Net Use T: \\OC-DC-01\Translations
Net USe N: \\OC-DC-01\Accounts      
Net USe H: \\OC-DC-01\Users\%UserName%
NeT Use I: \\OC-DC-01\InfoTech
Net use R: \\OC-DC-01\Conference
Net Use M: \\OC-DC-01\Management
Net Use X: \\OC-AS-02\DOSIBS
Net Use Z: \\OC-AS-02\OrbitsUpdate

adprintx.exe /cd "\\oc-dc-01\Samsung ML-2550 Series PCL 6"

if not exist "\\OC-DC-01\Users Home Drives\%username%\Favorites" (
  echo Folder does not exist...creating it...
  md "\\OC-DC-01\Users Home Drives\%username%\Favorites"
)
pause
@echo on
xcopy /s "%userprofile%\Favorites" "\\OC-DC-01\Users Home Drives\%username%\Favorites"
pause
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18895119
Oh, okay - use a /y after xcopy to avoid that... :^)
0
 

Author Comment

by:cgru2
ID: 19020209
I also get this error with your solution ...

C:\Documents and Settings\olgab>xcopy /y "C:\Documents and Settings\olgab\Favori
tes" "\\OC-DC-01\Users\OlgaB\Favorites"
Does \\OC-DC-01\Users\OlgaB\Favorites specify a file name
or directory name on the target
(F = file, D = directory)?

Any ideeas?
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 19020436
use the /I parameter
0
 

Author Comment

by:cgru2
ID: 19053848
As in:

xcopy /ly "C:\Documents and Settings\olga.......

or?
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 19055940
No, each parameter is seperated...as in:

xcopy /s /y /i "%userprofile%\Favorites" "\\OC-DC-01\Users Home Drives\%username%\Favorites"
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now