nullByteMe
nullByteMe

Reputation: 6391

Command works if run through the command prompt but not in a script..?

I'm trying to script the installation of a number of patches using a batch file since powershell doesn't properly install the patches. The command I'm running is this:

dism /online /add-package /PackagePath:"C:\<path>\5cbb03ca-7a2a-4326-952f-80ad8052a886\windows6.1-kb2836942-x64-express.cab"

That works perfectly when run directly from the command line. But if I put it in a file called example.bat it fails with the following message:

'þd' is not recognized as an internal or external command

Upvotes: 1

Views: 2198

Answers (1)

aphoria
aphoria

Reputation: 20179

I think your batch file is saved as Unicode.

Re-open it in Notepad and re-save it, making sure the Encoding field is set to ANSI.

Upvotes: 5

Related Questions