Task Scheduler error “The user account is unknown, the password is incorrect

Windows Scheduled Task Errors

I have an website up-time script that I need to deploy in a test environment.
The script has to be run as a scheduled task in Windows Task Scheduler and is designed to be run on a 15 minute interval.

I couldn’t seem to be able to set a scheduled task if my life depended on it because something was killing it every time I would try to create it. 

The error I got was something like…

Task Scheduler – The user account is unknown, the password is incorrect, or the user account does not have permission to modify the task”

After 30 minutes of scouring the various blogs and tech boards, I had found one little hint that pointed my in the right direction.

Check Your Antivirus Software

One  post, that had not even gotten a vote up stated that I should check my Antivirus to see if it was restricting writing of files to the System32 directory in Windows.

Sure enough, I temporarily disabled Avast Antivirus which had been blocking the creation of the scheduled task and now my Uptime script is working as designed.

The morale of the story is always remember to check your Antivirus settings when you run out of checking permission settings as a troubleshooting step.  

Hope this helps somebody!
~Cyber Abyss

Microsoft Excel: Saving Currency Values in CSV Files

Missing digit in CSV File Currency Values

I searched all over and did not find the right answer so I played around until I had found it myself and now I’ll share it with you.

I had picked up a VBA coding project from a contractor who was leaving.
The application takes a bunch of Excel data in various complex formats and creates a comma separated value file (CSV) as output that are used for import into a custom object in Salesforce.

The application takes a bunch of Excel data in various complex formats and creates a comma separated value file (CSV) as output that are used for import into a custom object in Salesforce.

One of the issues the customer was reporting was that they had an expectation that currency value in exported CSV files should retain the 2 digits after the decimal point.

The application was sending the output result in a CSV file but the currency value were only retaining one digit after the decimal if the last decimal was a zero.

A value of 91.20 is coming out as 91.2, missing the 2nd digit.

This happens consistently while using Excel with CSV files but not with XLS. It drops the zero every time.

How to Save currency values in a CSV File using Microsoft Excel

  1. Save your CSV file in MS Excel format with a .xlsx or .xls extension.
  2. Update the “Format Cells” to display the column as Currency. I set the option not to display a $ for currency and 2 digits after the decimal point.
  3. Save this file with a .CSV extension.  Your currency values with the 2 digits after the decimal point are preserved during this conversion.

That is it!

To validate it, open the CSV file with a text editor like Notepad or Notepad++ and you will see the number format with 2 digits after the decimal was retained.

Watch out!  If you open the CSV file with MS Excel and save it again as CSV, Excel will wipe out your currency formatting. 

Hope this helps somebody.