AppDeploy – New Website Added to BlogRoll

February 17, 2009

I’ve added a new website to my BlogRoll list.

The website is AppDeploy.com and its something like an excellent database with thousands of switches for installing applications silently or unattended and also as an interesting forum where you can talk with other people and try to find information for you specific application.

Hope you enjoy it!


Unattend Install of New Fonts

October 29, 2008

So…I’ve found myself in the need to install new fonts to my OS Image.

I’ve already read some things in the past about this, and tried a couple of things to silently install fonts.
The approachs were things like, copy the font to %systemroot%\fonts; Copy the font to %systemroot%\fonts and add a registry key.

At least for me, this didn’t work almost eveytime.

So I googled a little and found a useful resource from the MS Technet Scripting Guy!

So here’s an example of what you need to do:

Const FONTS = &H14&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(FONTS)

objFolder.CopyHere "C:\Maestro\Fonts\BesSanR_.ttf"

And this little piece of code really works great!

For more information please visit the Scripting Guy website (link)


How to silently install and configure printers

April 21, 2008

Ok…this one is a little old but its always useful to know how to silently install and configure a printer.

 

For starting, you should have a look at the command line options for installing a printer.

 

rundll32 printui.dll,PrintUIEntry /?

 

 

Now, using this example you may install a printer.

 

1. First install the printer by hand and configure it like you want it for final use (except network ports, which I never tested)

2. Use the command rundll32 printui.dll,PrintUIEntry /Ss /n “printer” /a “file.dat” where “printer” is the name of the printer you’ve installed and “file.dat” is the name of the file for saving the printer configuration


3. Now that you have the configuration file you can uninstall the printer and the printer driver from the computer.


4. For installing the printer you need to take a look at the
*.inf file for the string you need for installing the printer.


5. On this example I’ve used the
*.inf file from a HP LaserJet 2420 printer.


6. If you open it will notice a string that contains the text
“HP LaserJet 2420 PCL 5e”. This is the string part that you’ll need for installing the driver that you want.


7. Now that you have the string for installing the print just run something like the following command-line:

wshShell.Run “rundll32 printui.dll,PrintUIEntry /if /b “& aspas & “HP LaserJet 2420″ & aspas & ” /f C:\Temp\HPLaserJet2420\Drivers\hpc24×0b.inf /r ” & aspas & “lpt1:” & aspas & ” /m ” & aspas & “HP LaserJet 2420 PCL 5e” & aspas,7,True


8. On the example above this is a vbscript line, and what you need to know is:

§    “HP Laserjet 2420″ – The name you want your printer to show on Printers & Faxes.

§    “C:\Temp\HPLaserJet2420\Drivers\hpc24×0b.inf” – The path where your *.inf file is.

§    “lpt1:” – The port for the printer.

§    “HP LaserJet 2420 PCL 5e” – The string text that you’ve found before.


9. After this, you’ll notice that the printer will not have the configurations you want, so let’s configure it! Again, run something like this command-line:

wshShell.Run “rundll32 printui.dll,PrintUIEntry /Sr /n “& aspas & “HP LaserJet 2420″ & aspas & ” /a ” & aspas & “C:\Temp\HPLaserJet2420\HPLaserJet2420.dat”


10.On the example above this is again a vbscript line, and again, this is what you need to know:

§    “HP Laserjet 2420″ - The name of your printer like it shows on Printers & Faxes.

§    “C:\Temp\HPLaserJet2420\HPLaserJet2420.dat” – The path for your configurations file that you’ve saved before.

 

 

Problems:

 

This didn’t happened with all drivers I’ve tested but…sometimes when installing the drivers with no user logged in, the drivers just don’t install. So in case of software distribution, like always, you should test this before sending it for a production environment.