Jump to content

Recommended Posts

Posted

I've had a look at some of the previous postings on this subject, but being new to vanilla networks I am struggling with this one. Answers will need to be very step by step! Apologies if some of the information given below is unecessary.

 

I have a VBScript which is used to redirect Favorites to a folder in the user's My Documents called Favourites. This is used as a login script in Group Policy (User Configuation>Windows Settings>Scripts>Logon) All our pupils log in with one username for their class (primary school setup, I know!!! :roll: ). Teachers log in with their own username. The problem is that sometimes the Favorites are redirected and sometimes the Favorites is just empty when the users log on. I have just retested this with four computers logged on as one year 3 class: two had redirected favorites and two had none. When Favorites are showing, it is definitely the redirected one and not one from somewhere else.

 

However, I've recently discovered that, in the share on the server, but outside of the student or teacher area, a My Documents has appeared containing only Favorites. When I tested a teacher user, they got that Favorites and not the one from their own My Documents. I have no idea where this has come from!

 

We have mandatory profiles for teachers and pupils. My Documents is redirected to a share on the server by group policy under User Configuration>Windows Settings>Folder Redirection>My Documents>Basic; one policy for teachers and another for pupils. In Active Directory, in the Properties of the user in the Profile tab, the Home folder is connected to S: with a path to the same shared area on the server. But as far as I can tell, drive S: isn't mapped elsewhere on the server.

 

I am going round in circles with this one! If anyone can suggest some more tests that will narrow the problem down that would be great. I don't want to publish the script as I didn't create it, but I can pm it to someone if they are willing to take a look.

Posted

At first sight, it appears as if your script is creating the 'Favourites' folder in the wrong place. Check the path name.

 

Might also be helpful to post your script.

Posted

Yes please post your script as it will be handy to people that give students mandatory profiles but may want them to keep their favourites.

 

Ben

Posted

I have two scripts which aid in our mandatory profiles. One is run when a user fires off IE:

 

; AutoIt Version: 3

; Language: English

; Platform: WinXP

; Author: Matt Marsh

; Script Function: Bookmark Programe - Logon Script

 

If FileExists(EnvGet("USERPROFILE") & '\Favorites\st johns homepage.url') Then

FileCopy('N:\Favorites\*.url', EnvGet("USERPROFILE") & '\Favorites', 1)

Else

FileCopy('\\stjohns01\apps\Favorites\st johns homepage.url', EnvGet("USERPROFILE") & '\Favorites')

EndIf

 

Exit

 

The N: drive is the users home directory. This will check for a URL, if it is there then it will copy all the files in it to the users profile so any urls they have saved they can view.

 

The logoff script runs when they close IE:

 

; AutoIt Version: 3

; Language: English

; Platform: WinXP

; Author: Matt Marsh

; Script Function: Bookmark Programe Logoff Script

 

If FileExists('N:\Favorites\st johns homepage.url') Then

FileCopy(EnvGet("USERPROFILE") & '\Favorites\*.url', 'N:\Favorites', 1)

Else

DirCreate('N:\Favorites')

FileCopy(EnvGet("USERPROFILE") & '\Favorites\*.url', 'N:\Favorites', 1)

Endif

Exit

 

When run [ when the user closes IE ] this will copy over any URLs they have added to their favorites, so next time they logon to a different PC the first script will run and will copy over the URLs.

I hope this makes sense.

 

Both are AutoIT Scripts and will need compiling into exes. How you get these to run before IE launches & closes is up to you.

I hope this helps - it may give you a clue or idea how to solve your problem.

Posted

It may just be easier to point favorites to the folder on the N drive - that way you don't have to worry about catching IE launching/closing (eg would your script run when someone just clicks on a link in Word etc)

 

We use the following in a login script

 

set oShell =createobject("wscript.shell")oShell.regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Favorites","%homeshare%\favorites","REG_EXPAND_SZ"

 

this makes sure that favorites is always going to be the folder "favorites" on the user's home drive

Posted

Thanks, folks. Have been out of it for a day - picked up a tummy bug from my son - and am still off work. But will have a look in detail at your suggestions when back on Monday. Head still a bit muzzy due to lack of food. Looks like there may be some good things to try, so thank you for your help so far.

 

Did wonder why the script seemed to work sometimes and not others, though. Wondered if maybe it was because we log in a whole class with the same username, and maybe the system can't cope.

 

Will post script if necessary. Watch this space!

Posted

Hi Andie

 

I found this AD Template when i was searching around..... and i think it will help with the redirection of faves.....

 

Ive not tested this out as yet, but am going to do so in a little while, i will feed back on this....

 

but for anyone who wants to give it a shot here is the link

 

AD Template

 

Niraj

  • Thanks 1
Posted

Thanks for the link to that AD template - I may try that out - I can then dump the script I wrote !!

Its done its job, been going for 2 years ish - not bad and I have had no complaints....

Posted
I'd be interested in the results of your tests on the AD Template. I don't have any test facilities here, so trying things out can be a bit dicey. I've never used a template before, but it looks like the link covers some instructions on how to use it too. (Brain beginning to function a bit now, after rice krispies and toast!).
Posted

OK, here's the script that is currently used as a login script for pupils and teachers:

 

'Favourite Folder creation - creates folder in users home area

'The script below is for a LAN with a "My Docs" redirect GPO, but %username% could be used

'Please note the different spellings of 'favourites/favorites'

 

On Error Resume Next

Set fs = CreateObject ("Scripting.FileSystemObject")

Set foldr = fs.CreateFolder ("S:\My Documents\Favourites")

On Error Resume Next

Set WSHShell = nothing

 

 

'Fav Folder redirection

 

Dim Path

Path = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\"

set ws = WScript.CreateObject("WScript.Shell")

o=ws.RegWrite(Path & "Favorites", "S:\My Documents\Favourites","REG_EXPAND_SZ")

v=ws.RegRead(Path & "Favorites")

Set WSHShell = nothing

 

The My Documents is redirected by GPO to the following path:

 

Path: \\MS-LNM-SERVER\user data\students\%USERNAME%\My Documents

 

In the user Properties, for each pupil and teacher user, on the Profile tab, is the following entry in the Home Folder section:

 

Connect: S: To: \\Ms-lnm-server\User Data\Students\username

 

where the username is the actual username, not a variable.

 

Also may be worth pointing out that we have a mixture of XP and Win2k workstations here, running on Server 2003.

Posted

Hi, folks. I have done a bit of comparing the script I have, which may or may not be the cause of my problem, with the scripts others have posted here. Although there are common elements, they all seem different. I have no knowledge of scripting languages, so can't tell if mine is faulty or not based on what I can see here.

 

If no one can spot anything obvious, I guess i will have to hope that someone will get time to check out the ADM template and report back.

 

Thanks to all who have helped so far.

Posted

If no one can spot anything obvious, I guess i will have to hope that someone will get time to check out the ADM template and report back.

 

Andie, I'm the one who wrote the ADM and I have deployed it for quite a few of my customers without issues - all it does is to alter the registry and nothing more. Just make sure you wisely choose the scope to which the GPO will be linked to and you will be ok. If you have any issues, drop me a line or PM me (I am not monitoring this forums - sorry).

 

Cheers,

Guy

  • 1 month later...

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



×
×
  • Create New...