Posts

Showing posts with the label Batch Files

CHCP – DOS Special Character Problems (CMD Active Codes)

Another “very hard to find” tip… When writing batch files with some special characters like “é” or “à”, you might have surprise errors. Running batch files, with special characters in the code, can cause some serious interpretation problems and your commands might not work at all. Sometimes, you can’t avoid using these characters, like in my case. Because I live in Montréal, Québec (French part of Canada) and there are serious law issues that we have to respect and I think the most difficult part of my job is this language issue. The trick is hidden in this link from Microsoft; http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/chcp.mspx?mfr=true The « chcp » command displays or sets the active code page number is the remedy to your problem. By putting the “chcp 1252” at the beginning of your code, you are changing the “active code” for your cmd environment before even executing your commands in the batch file. The number 1252 is...

Repackage an Application - Silent Install - Batch to EXE Converter

Image
Repackage an Application – PDF-XChange Viewer PRO Deployment Methods -This example will use the program PDF-XChange Viewer PRO for demonstration purposes but you can use any other software that is compatible with this method of repackaging! Write a batch file with the following (desired) commands; @echo off "setup.exe" /VERYSILENT /NORESTART /COMPONENTS:"pdfviewer,Help,IEAddin" /KEY:"XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" /PDFV /PDFVINBROWSER regedit.exe /s "settings.reg" exit The file "settings.reg" is the registry entries which contains some of the preferences and settings for this particular program. All software that we install on our computers has this kind of entries in the "Registry Editor". You can export this registry key for your particular program and add in your batch file in order to customize some of the settings silently right after the installation! Once your batch file is ready, let's save i...