Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace a File with Group Policy 1

Status
Not open for further replies.

strai81

IS-IT--Management
May 2, 2002
28
0
0
US
I am looking for some help to either replace a file or append to it with a Group Policy. I am getting used to Group Policies but don't have a clue here. Here is what I am trying to do. I have an iPrism in place that I want to enable Auto-Login on. Everything works fine with IE, but I have quite a few people using Firefox, and for it to work with Auto-login, the file firefox.js needs to have the hostname of the iPrism added to it.

According to St. Bernards instructions, the changes can be made to the file and pushed out to each pc in the domain, and I'm not sure how the best way to go about that is. I don't really want the file to be copied everytime a user logs on. I was hoping to find a Firefox ADM and make the change there, but I haven't had any luck with that.

Any suggestions?

Thanks in advance.
 
No way that I know of to do this with group policy. Something like this should be in the logon script.

Thanks,
Andrew

[smarty] Hard work often pays off over time, but procrastination pays off right now!
 
I have Server 2003. What I need to do is rename a file in this folder C:\Program Files\Mozilla Firefox\defaults\pref, and copy a new one into that folder.

I have a batch file that will do the job, but Domain Users don't have write access to that folder.

I have just about exhausted all I know and ready to tell everyone to modify the file manually, but I really don't want to do that.
 
Run batch file as computer startup script, not as logon script.

===
Karlis
ECDL; MCSA
 
Getting closer. I ran the batch file as a computer start up script, and I can now rename the file in question, but the new one still isn't copying into place. Here is a copy of my script.

Thanks again for the help.

IF NOT EXIST "C:\Program Files\Mozilla Firefox\" GOTO END
IF EXIST "C:\Program Files\Mozilla Firefox\defaults\pref\firefox.js_old" GOTO END

cd\Program Files\Mozilla Firefox\defaults\pref
ren firefox.js firefox.js_old
cd\


xcopy "\\etexdc1\vol1\LogonScripts\firefox.js" "C:\Program Files\Mozilla Firefox\defaults\pref"


:END
 
change
Code:
cd\Program Files\Mozilla Firefox\defaults\pref
to
Code:
cd "\Program Files\Mozilla Firefox\defaults\pref"

and see if that works

Pat Richard MVP
Plan for performance, and capacity takes care of itself. Plan for capacity, and suffer poor performance.
 
If destination is a directory, it should end with backslash

Code:
xcopy "\\etexdc1\vol1\LogonScripts\firefox.js" "C:\Program Files\Mozilla Firefox\defaults\pref\"

===
Karlis
ECDL; MCSA
 
I am still having no luck with this. I have used the script as a computer startup script, and the old file does get renamed, but it seems like Domain Admins are the only one's that the new file will copy to. Domain Users don't seem to have the permissions to copy the new file, yet the old file can be renamed. Is there just no way in Server 2003 to do this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top