Showing posts with label Edugeek. Show all posts
Showing posts with label Edugeek. Show all posts

Friday, 2 March 2012

Network Font Installation

Do you constantly get requested by users to install fonts? Or would you like to give users the ability to install their own fonts?

Save the code below as a vbs file, and add it the the computer startup. All you or your users have to do then is put any fonts you/they want installing, into the shared server folder (\\server\share\fonts in the example).

It's built as a subroutine, so you can easily add it to an existing script or run it on its own.

If you ever want to add a new font, just copy it to the server; next time the machines reboot they'll install it. I've made the shared folder available to end users so they can add their own, obviously they need to be aware not to copy hundreds at a time, otherwise other users are not going to be too please next time they start their PCs.


Code:
Sub InstallFonts
   on error resume next
   Const FONTS = &H14
   dim oFSO,oShell,oFolder1,oFolder2,sRoot
   sRoot=\\server\share\fonts\
   set oShell = CreateObject("Shell.Application")
   set oFSO=createobject("scripting.filesystemobject")
   set oFolder1 = oShell.Namespace(FONTS)
   set oFolder2=ofso.getfolder(sRoot)  
   for each oFile in oFolder2.files
   sName=lcase(oFile.name)
      if right(sName,4)=".ttf" then
         if not ofso.fileexists(oFolder1.self.path & "\" & sName) then
            oFolder1.copyhere sRoot & sName
         end if    
      end if  
next  
on error goto 0
End Sub
InstallFonts

Saturday, 26 March 2011

sparkeh blog: Making Installshield deployments silent

Whilst trawling through edugeek.net this morning I found this post which could be useful for anyone who wants to make an Installshield installation silent. Although I already knew about the /s switch using /r was new to me. Hopefully he will continue to post new information that I don't have the time to find out for myself.

sparkeh blog: Making Installshield deployments silent



I have posted the text below as found on the site:


"Every so often I come across something that I am astounded that I don't already know. This might be a lot of old chips to you but whilst looking for tips on deploying Installshield installers I stumbled across guidance on making the deployment silent.
As you probably know, Installershield deployments usually come as a setup.exe file. This is not always the case but then you can usually grab the setup.exe and other setup files (cab file for example) from a temp folder when you launch the installer.
If you want to make the installation silent you need to use the /s switch, however the installer will look for and answer file called setup.iss. If you are luck then your software vendor will have provided one. Not very often though in my experience.
The good news though, is that you can create one yourself by running the installation with the record switch /r. This dumps a setup.iss file in c:\windows. Move this to the same directory as the installer and you can run the installation silently (with /s) with all the options you chose in the recorded run through. Well almost ;)

There is one sting in the tale to be aware of though. Due to a forked process starting up and completing before the installation is complete, you need to add another switch (/sms) to force the process to wait until the installation is complete.
So in summary, once you have a installer with its setup.iss in place you can run 'setup.exe /s /sms'."