Jump to content

Guybrush3pwood

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Guybrush3pwood

  1. Maybe it's not clear what I'm trying to do?
  2. Try as I might, i can't get it to detect strings of text, and then stop the script when detected. Could use some help.
  3. Here's where I'm at. It keeps telling me "expected end." Where am I going wrong? dim filesys, filetxt, strSearchFor  strSearchFor = "pref(""network.negotiate-auth.trusted-uris"", ""dl-okoar-01.chikentime.local"");" Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set filesys = CreateObject("Scripting.FileSystemObject") Set objFile = filesys.OpenTextFile("C:\Program Files (x86)\Mozilla Firefox\defaults\pref\channel-prefs.js", ForReading)     If InStr(strLine, strSearchFor) = True Then Set filetxt = Nothing     If Not found then Set filetxt = filesys.OpenTextFile("C:\Program Files (x86)\Mozilla Firefox\defaults\pref\channel-prefs.js", ForAppending, True) filetxt.WriteLine("pref(""network.negotiate-auth.trusted-uris"", ""dl-okoar-01.chikentime.local"");") filetxt.WriteLine("pref(""network.automatic-ntlm-auth.allow-non-fqdn"", true);") filetxt.WriteLine("pref(""network.negotiate-auth.allow-non-fqdn"", true);") filetxt.Close End If
  4. I was actually able to figure it out, but now for the last piece of the puzzle. I need the script to check for the lines I want to write before they're written and quit the script if it detects the string or continue if it doesn't. How would I do that?
  5. Not sure if this is even possible, but we're trying to add a site to trusted sites in Firefox, but in order to do so, we need to modify the prefs.js file in the profile folder under "profiles." Problem is, we want to make this change to all the machines on our network, but because Firefox gave random profile names to each user, we need to either use a wild card, or make a scrip that can pull the user id from the profiles.ini file and input it into the script with an append function. Anyone know how I can accomplish this? Seems to be quite difficult.
×
×
  • Create New...