cgru2
asked on
Using logon script to save IE favourites, history, my documents, etc
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So does the above work for you?
ASKER
No .. it didnt
I'm confused then...what's the problem at this point?
ASKER
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.
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.
So this should do it...no?
if not exist "\\ServerName\Users Home Drives\%username%\Favorite s" md "\\ServerName\Users Home Drives\%username%\Favorite s"
xcopy "%userprofile%\Favorites" "\\ServerName\Users Home Drives\%username%\Favorite s"
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"
if not exist "\\ServerName\Users Home Drives\%username%\Favorite
xcopy "%userprofile%\Favorites" "\\ServerName\Users Home Drives\%username%\Favorite
if not exist "\\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"
ASKER
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%\Favorite s" md "\\OC-DC-01\Users Home Drives\%username%\Favorite s"
xcopy "%userprofile%\Favorites" "\\OC-DC-01\Users Home Drives\%username%\Favorite s"
It's still not creating a Favourites folder in the users share drive...
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%\Favorite
xcopy "%userprofile%\Favorites" "\\OC-DC-01\Users Home Drives\%username%\Favorite
It's still not creating a Favourites folder in the users share drive...
ASKER
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\cristian g\Favorite s"
Overwrite \\OC-DC-01\Users\cristiang \Favorites \MSN.com.u rl (Yes/No/All)? Y
C:\Documents and Settings\cristiang\Favorit es\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).
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\cristian
Overwrite \\OC-DC-01\Users\cristiang
C:\Documents and Settings\cristiang\Favorit
Overwrite \\OC-DC-01\Users\cristiang
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).
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%\Favorite s" (
echo Folder does not exist...creating it...
md "\\OC-DC-01\Users Home Drives\%username%\Favorite s"
)
pause
@echo on
xcopy /s "%userprofile%\Favorites" "\\OC-DC-01\Users Home Drives\%username%\Favorite s"
pause
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%\Favorite
echo Folder does not exist...creating it...
md "\\OC-DC-01\Users Home Drives\%username%\Favorite
)
pause
@echo on
xcopy /s "%userprofile%\Favorites" "\\OC-DC-01\Users Home Drives\%username%\Favorite
pause
Oh, okay - use a /y after xcopy to avoid that... :^)
ASKER
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\Fa vorites"
Does \\OC-DC-01\Users\OlgaB\Fav orites specify a file name
or directory name on the target
(F = file, D = directory)?
Any ideeas?
C:\Documents and Settings\olgab>xcopy /y "C:\Documents and Settings\olgab\Favori
tes" "\\OC-DC-01\Users\OlgaB\Fa
Does \\OC-DC-01\Users\OlgaB\Fav
or directory name on the target
(F = file, D = directory)?
Any ideeas?
use the /I parameter
ASKER
As in:
xcopy /ly "C:\Documents and Settings\olga.......
or?
xcopy /ly "C:\Documents and Settings\olga.......
or?
No, each parameter is seperated...as in:
xcopy /s /y /i "%userprofile%\Favorites" "\\OC-DC-01\Users Home Drives\%username%\Favorite s"
xcopy /s /y /i "%userprofile%\Favorites" "\\OC-DC-01\Users Home Drives\%username%\Favorite
ASKER
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.