Home

# Thread: Edit text file action (where file is .JS extension)

1. Member
Join Date
Jun 2008
Posts
14

## Edit text file action (where file is .JS extension)

Hi,

I have a bundle where I am trying to modify the Firefox preferences file to add a line to it as follows:
So Action Edit text file.
Change Name: Change Firefox download location.
Change Mode: Append lines to File.
New String: user_pref("browser.download.dir", "H:\\My Documents");

File Operation: Specify changes to the file.
Encoding: Autodetect (I wasn't sure whether to change this as file has .JS extension).
FileName: \${appdata}\Mozilla\Firefox\profiles\default\prefs. js
Requirements: where the following File Exists \${AppData}\Mozilla\Firefox\Profiles\Default\prefs. js
Run Action As User.

This does seem to edit the relevant file.

However, when I run Firefox it doesn't recognise the change I made, or ignores it.

If instead I make the change in
\${AppData}\Mozilla\Firefox\Profiles\Default\prefs. js manually first in Notepad, ie add the line
user_pref("browser.download.dir", "H:\\My Documents");

Then I choose Action Copy File and copy the file as Logged in User to \${AppData}\Mozilla\Firefox\Profiles\default\prefs. js.
Copy Always.
Firefox does recognise this change.

However, I don't want to replace any existing prefs.js files as that will overwrite existing user preferences, I want to edit the existing prefs.js and add the line.

So not sure why the Edit File action isn't working or why Firefox isn't picking up the added change?

Paul
Last edited by scopsm; 24-Oct-2012 at 11:21 AM.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•