google / cloud-print-connector

Google Cloud Print Connector
BSD 3-Clause "New" or "Revised" License
764 stars 184 forks source link

Can't Edit json File - Windows #430

Open steelopus opened 5 years ago

steelopus commented 5 years ago

Today I decided I wanted to add some of the printers on our server (nearly 600 printers) to the blacklist in the config file. So I did the following steps:

  1. Manually stopped the Cloud Print Connector service.
  2. Edited the json config file, adding a few printers to the blacklist section, using the correct formatting.
  3. Attempted to start the service.

That's where it all went wrong. The service failed to start, reporting "Error 1: Incorrect function". No matter what I tried, I couldn't get the service to restart.

So I uninstalled Cloud Print Connector, reinstalled, and I'm back up and running, though now I have nearly 600 duplicate printers --- I'll use GAM to clean up that mess.

So, what is the correct process for editing the json file on Windows after an initial installation?

Thank you.

KenGardner commented 5 years ago

Try linting your json to see where the error is https://jsonlint.com/