Ask a questionAsk a question
 

AnswerDeploy Printers In Sharepoint

  • Monday, June 16, 2008 2:39 PMmykul Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I am new to the Sharepoint world and I need some info on it. I wouild like to have a list on my main page that lists the printers for my company. I would like users to have the ability to click on the printer and then have it install the printer onto the client's machine. Is this possible?

Answers

  • Thursday, June 19, 2008 4:42 PMJon _ ICM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    ** Update:  I just re-read and I got Mykul confused with Dave**  anyhow, the key is that my original directions were *ahem* "Poo" to use a polite term because of a MS security update for IE.

     

     

    Here's the real deal (aka “Why My Instructions were Poo”):  This morning, after I saw your response I set up a similar list and tested...  and got your same result.  On investigating, I noticed that sharepoint was adding a file:// to the beginning of my nice UNC path to the printer.  "Ah Hah" I thought...  easy enough to fix...  I will just change the field type to HTML ('Multiple Line of Text'..  'Enhanced Rich Text' to be specific) and I will force the UNC reference. 

     

    Turns out that way doesn't work either.  To figure out why, I opened up a new Internet Explorer window and typed the UNC reference directly into the address bar.  Same result.  At that point I got irritated, because I used this method several times in the past to setup an online printer directory, before moving on to more 'sophisticated' (read: technically challenging) methods such as deployment through group policy etc.

     

    Short story is that MS has deployed at least two IE security updates which prevent this from working….  From the little amount of time I have spent researching, these were to block .CHM (Help File) vulnerabilities… but had the side effect of blocking a straight UNC install via Internet Explorer….  HOWEVER it does still allow UNC references to network file shares, which believe it or not is all we really need.

     

    Luckily, I have a colleague who will shortly need these same instructions, so I’ve created a step-by-step walk-through:

     

    1.       Create a network share point that your intended audience will have access to.  (READ & Execute are the only permissions they will need.)  Example:  \\fileserver\SPPrinters

    a.        This is required because .bat and .cmd file types are blocked by default in sharepoint.  There are various reason’s why you would not want to un-block them so let’s just use a network shared folder.  If you don’t know how to create a share, ask your server admin for assistance.

    2.       Create a batch file (which is just a text file with a .bat file extension) for each printer you will need to reference called Printername.bat

    a.        Inside the batch file you will need the UNC reference we discussed previously.  (i.e. \\PrintServer\Printer001 )  You will need one of these batch files with a single statement for each printer you want to deploy in this method.  Test them and make sure that they install the printer in question.  (You may want to delete the printers from your machine after you do so as you will want to test installing them from your list once you get done as well.)

    3.       Now create your custom list in sharepoint. 

    a.        Easiest way to do this is to click on the ‘View All Site Content’ link in the site where you want the list to be hosted.  (Located at the top of the quick launch bar)

    b.       If you have permissions to do so, you should see a “Create” link right below the bolded “All Site Content” at the top of the page.  Click on it to go to the “Create” page where you can “Select an item to create a new list, library, discussion board, survey, page or site”.

    c.        Select “Custom List”

    d.       Give your list a meaningful name (“Printer Directory” or something similar).  It a good idea to provide some kind of description on the off chance that the Name is not completely self-explanatory.  Decide whether or not you want the list to be displayed on the Quick Launch.  Single-Click the Create button to continue.

    e.       Now your basic list is created, let’s add the fields we will need.  Select the ‘Settings’ dropdown and choose ‘List Settings’

    f.         Ignore the first section (for now) and concentrate on the Columns area.  First Click on the word Title (in blue) in the Available Columns List.  Since “Title” doesn’t mean a whole lot in the context of a printer directory, change the Column Name to “Printer”, “PrinterID” or whatever your local naming convention is.  As a general rule, I try to avoid spaces in my column names if I can help it.  (As you get more versed in sharepoint you will probably come to appreciate this more.  The addresses can get very long and a bunch of %20’s for every space don’t help.)  Click OK to go back to the List Settings page.

    g.        Click on “Create Column”.  Call This one “Install_Link” or something similar.  Choose “Hyperlink or Picture” as the type of information for this column.  Leave the default settings.  Click OK to create column and return to the list.

    h.       If you want to get Fancy with it, add in column for Printer Model, Printer Location etc….  whatever might be necessary to allow users to easily identify the printer they want to install.  (you get the idea.)  Once you are finished creating columns, I would go ahead and set your list permissions so that your users have read only access to it.  (For a windows domain, if you want “Everyone” to be able to access this list, I would use “domain\domain users” rather than the “NT AUTHORITY\AUTHENTICATED USERS” which come up by default if you choose to use one of the built-in visitors groups.  A full Permissions discussions is out of scope for this, so we’ll go ahead and move on…)

    i.         In the breadcrumb list above the bolded “Customize [LIST NAME}” select the name of you list to go back to the list itself and stop customizing it.

    4.       Now, let’s start creating records:

    a.        Click “New” to create your first entry.  Fill Out the PrinterID (Formally Title) field with the common name for the printer.  In the Install_Link field enter the UNC path to the batch file that installs this particular printer: (example:  \\fileserver\SPPrinters\prnt001.bat  )  Make sure that you include the full path to the correct, tested, batch file.  Where it says ‘Type the Description I would put something like this: CLICK HERE TO INSTALL PRNT001 .  Fill out any additional fields you may have added and Hit OK to save your changes.

    b.       Test the results.  What should happen is that you get prompted with a file download dialog box asking you if you want to Run or Save the PRNT001.bat file.  Select run.  (Make sure that your list includes a note somewhere telling users to expect this and to Select Run when it occurs.  I would suggest putting this in the list description, as it will show at the top of the screen in your list view.)

    c.        Wash, rinse & repeat! 

    5.       You have now created a sharepoint list that you can use to deploy network printers.  You can take this same basic concept and get as fancy as you wish…  we are planning to use a wiki to allow people to click a map region (floorplan for our buildings) in order to install all of the relevant printers for that area.   (No walk-through planned for that, as it’s much more complex and I’m not sure I will have time.)

     

All Replies

  • Monday, June 16, 2008 4:30 PMJon _ ICM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    If you are on a windows network, yes....  there are many ways.  The easiest would be this:

     

    Create a custom list in sharepoint. 

    1.  For the 'Title' field fill in the names of your printers. 

    2.  Add a location field to decribe where they are located or a description field for the same purpose.

    3.  Add a 'Hyperlink or Picture' field called 'Install Link' (or something similar) and enter a hyperlink for each Printer in the following format:  \\Printservername\sharedprintername (substituting of course your own print server name and shared printer name)

     

    Finally, you just need to add a web part to whatever page you are creating to display the info so that users can browse and install the appropriate printer(s) they need.

     

    Make sure the list you create is in the same site that the web part page you plan on displaying this is at.  Otherwise you will not be able to reference the list easily.

     

  • Monday, June 16, 2008 6:51 PMmykul Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Thank you for the information. I will try what you have suggested.

  • Monday, June 16, 2008 9:35 PMJon _ ICM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Email or post if you have any problems.... should be pretty easy.

     

  • Wednesday, June 18, 2008 1:32 PMmykul Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I am having problems. I really don't know where to start editing Sharepoint in order to post these printers. Could I get some steps on how to get me started?

  • Wednesday, June 18, 2008 1:34 PMJon _ ICM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Do you know how to create a list in sharepoint?

     

  • Wednesday, June 18, 2008 1:38 PMmykul Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    No. I am very new at Sharepoint.

     

  • Wednesday, June 18, 2008 2:51 PMJon _ ICM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    In that case you need to get the basics down first...  Start here: http://office.microsoft.com/en-us/sharepointserver/HA102488011033.aspx

     

    Install the standalone training on your desktop and run through the training, it will teach you everything you need to know to do this.

  • Wednesday, June 18, 2008 3:48 PMDave Pyett Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Jon,

    I have tried this on our system here (WSS3.0) and I am running Vista but when I click the install link, I get a page cannot be displayed error.
    Any ideas?

    EDIT: If i type in \\printerserver\printername into my run command on Vista, then it connects up to the pritner no problem.

    TIA
  • Wednesday, June 18, 2008 4:05 PMJon _ ICM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Install the standalone training on your desktop and run it from there, not on your wss server. (As suggested)

     

  • Thursday, June 19, 2008 8:23 AMDave Pyett Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I've installed the stand alone training but can't see anything in here that shows me how to install printers from SharePoint.
    Creating the lists isn't the problem (I have bucket loads of custom lists).
  • Thursday, June 19, 2008 2:13 PMmykul Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Where do I go to add "Hyperlink or Picture" field?

  • Thursday, June 19, 2008 3:50 PMChrisMurph Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    The key is the training material, it covers the basics. You need to add a column, from there you have options and the "hyperlink or picture" is one of them. However I am having the same problems as the previous poster with the linking. I think it's an IE issue as if I just use the same share link in IE I get the same error sharepoint tosses me.
  • Thursday, June 19, 2008 4:42 PMJon _ ICM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    ** Update:  I just re-read and I got Mykul confused with Dave**  anyhow, the key is that my original directions were *ahem* "Poo" to use a polite term because of a MS security update for IE.

     

     

    Here's the real deal (aka “Why My Instructions were Poo”):  This morning, after I saw your response I set up a similar list and tested...  and got your same result.  On investigating, I noticed that sharepoint was adding a file:// to the beginning of my nice UNC path to the printer.  "Ah Hah" I thought...  easy enough to fix...  I will just change the field type to HTML ('Multiple Line of Text'..  'Enhanced Rich Text' to be specific) and I will force the UNC reference. 

     

    Turns out that way doesn't work either.  To figure out why, I opened up a new Internet Explorer window and typed the UNC reference directly into the address bar.  Same result.  At that point I got irritated, because I used this method several times in the past to setup an online printer directory, before moving on to more 'sophisticated' (read: technically challenging) methods such as deployment through group policy etc.

     

    Short story is that MS has deployed at least two IE security updates which prevent this from working….  From the little amount of time I have spent researching, these were to block .CHM (Help File) vulnerabilities… but had the side effect of blocking a straight UNC install via Internet Explorer….  HOWEVER it does still allow UNC references to network file shares, which believe it or not is all we really need.

     

    Luckily, I have a colleague who will shortly need these same instructions, so I’ve created a step-by-step walk-through:

     

    1.       Create a network share point that your intended audience will have access to.  (READ & Execute are the only permissions they will need.)  Example:  \\fileserver\SPPrinters

    a.        This is required because .bat and .cmd file types are blocked by default in sharepoint.  There are various reason’s why you would not want to un-block them so let’s just use a network shared folder.  If you don’t know how to create a share, ask your server admin for assistance.

    2.       Create a batch file (which is just a text file with a .bat file extension) for each printer you will need to reference called Printername.bat

    a.        Inside the batch file you will need the UNC reference we discussed previously.  (i.e. \\PrintServer\Printer001 )  You will need one of these batch files with a single statement for each printer you want to deploy in this method.  Test them and make sure that they install the printer in question.  (You may want to delete the printers from your machine after you do so as you will want to test installing them from your list once you get done as well.)

    3.       Now create your custom list in sharepoint. 

    a.        Easiest way to do this is to click on the ‘View All Site Content’ link in the site where you want the list to be hosted.  (Located at the top of the quick launch bar)

    b.       If you have permissions to do so, you should see a “Create” link right below the bolded “All Site Content” at the top of the page.  Click on it to go to the “Create” page where you can “Select an item to create a new list, library, discussion board, survey, page or site”.

    c.        Select “Custom List”

    d.       Give your list a meaningful name (“Printer Directory” or something similar).  It a good idea to provide some kind of description on the off chance that the Name is not completely self-explanatory.  Decide whether or not you want the list to be displayed on the Quick Launch.  Single-Click the Create button to continue.

    e.       Now your basic list is created, let’s add the fields we will need.  Select the ‘Settings’ dropdown and choose ‘List Settings’

    f.         Ignore the first section (for now) and concentrate on the Columns area.  First Click on the word Title (in blue) in the Available Columns List.  Since “Title” doesn’t mean a whole lot in the context of a printer directory, change the Column Name to “Printer”, “PrinterID” or whatever your local naming convention is.  As a general rule, I try to avoid spaces in my column names if I can help it.  (As you get more versed in sharepoint you will probably come to appreciate this more.  The addresses can get very long and a bunch of %20’s for every space don’t help.)  Click OK to go back to the List Settings page.

    g.        Click on “Create Column”.  Call This one “Install_Link” or something similar.  Choose “Hyperlink or Picture” as the type of information for this column.  Leave the default settings.  Click OK to create column and return to the list.

    h.       If you want to get Fancy with it, add in column for Printer Model, Printer Location etc….  whatever might be necessary to allow users to easily identify the printer they want to install.  (you get the idea.)  Once you are finished creating columns, I would go ahead and set your list permissions so that your users have read only access to it.  (For a windows domain, if you want “Everyone” to be able to access this list, I would use “domain\domain users” rather than the “NT AUTHORITY\AUTHENTICATED USERS” which come up by default if you choose to use one of the built-in visitors groups.  A full Permissions discussions is out of scope for this, so we’ll go ahead and move on…)

    i.         In the breadcrumb list above the bolded “Customize [LIST NAME}” select the name of you list to go back to the list itself and stop customizing it.

    4.       Now, let’s start creating records:

    a.        Click “New” to create your first entry.  Fill Out the PrinterID (Formally Title) field with the common name for the printer.  In the Install_Link field enter the UNC path to the batch file that installs this particular printer: (example:  \\fileserver\SPPrinters\prnt001.bat  )  Make sure that you include the full path to the correct, tested, batch file.  Where it says ‘Type the Description I would put something like this: CLICK HERE TO INSTALL PRNT001 .  Fill out any additional fields you may have added and Hit OK to save your changes.

    b.       Test the results.  What should happen is that you get prompted with a file download dialog box asking you if you want to Run or Save the PRNT001.bat file.  Select run.  (Make sure that your list includes a note somewhere telling users to expect this and to Select Run when it occurs.  I would suggest putting this in the list description, as it will show at the top of the screen in your list view.)

    c.        Wash, rinse & repeat! 

    5.       You have now created a sharepoint list that you can use to deploy network printers.  You can take this same basic concept and get as fancy as you wish…  we are planning to use a wiki to allow people to click a map region (floorplan for our buildings) in order to install all of the relevant printers for that area.   (No walk-through planned for that, as it’s much more complex and I’m not sure I will have time.)

     

  • Thursday, June 19, 2008 4:43 PMJon _ ICM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    Chris - I just posted a walk-through on how to get around that...  it should resolve your problem.
  • Thursday, June 19, 2008 4:52 PMmykul Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

     

    I am going to test this out and see how it works. Thank you for your help on this.
  • Thursday, June 19, 2008 4:54 PMJon _ ICM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    No problem.  I just walked through each step and tested and it worked fine so you should have no troubles.

     

  • Thursday, June 19, 2008 6:33 PMmykul Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I can not seem to get the bacth file for the printer install to work. Can you give me an example of what you are using?

  • Thursday, June 19, 2008 6:41 PMJon _ ICM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Using notepad, create a file called prnt001.bat 

    inside the file you should have:

     

     

    (Substituting your print server name and printerid,of course.)

    That's all there is to it.  Save it and double-click on it to test. 

     

     

     

  • Thursday, June 19, 2008 6:51 PMmykul Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    In order for mine to run I had to make it look like this:

     

    start \\printeserver\prnt001

  • Thursday, June 19, 2008 7:11 PMmykul Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Other than having to add "start" to my batch file everything worked as you listed. Thank you so much for your help. I don't see why this isn't a template thats available from MS.

  • Thursday, June 19, 2008 7:14 PMJon _ ICM Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    No sweat.  You might help the next guy out and mark the appropraite post as the solution to your problem though...

     

  • Thursday, June 19, 2008 7:16 PMmykul Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I just did. Thanks again.

  • Friday, June 20, 2008 8:02 AMDave Pyett Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thanks Jon!
  • Wednesday, August 13, 2008 6:34 PMFenixdood Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    I also wanted to have a printer index for users to install from.. My idea was a link to a full web page within sharepoint. My gui consists of  a table with buttons (add) (remove) printers. also asks whether to default the printer as well. So as I have it so far all works well other than I would rather have the buttons and Printer info show up in a frame of the Sharepint web. What i have now is a link which opens up a new page for the users. Perhaps someone can shed some lite on how to have the link open up in the sharepoint frame,I am attaching a sample of the code I am using, which works very well BTW ( other than trusting the site, which is no biggie)

    <SCRIPT LANGUAGE="VBScript">

    Function delPrint(pname)
      Set objNetwork = CreateObject("Wscript.Network")
      confDel = msgbox ("Do you want to remove " & pname & " ?",vbYesNo)
      If confDel = 6 Then
         objNetwork.RemovePrinterConnection pname
         msgbox (pname & " Has Been Removed.")
      Else
         msgbox (pname & " Will Not Be Removed.")
      End If
    End Function


    Function addPrint(pname)
      Set WshNetwork = CreateObject("WScript.Network")
      WshNetwork.AddWindowsPrinterConnection pname
      mkDef = msgbox ("Do you want " & pname & " to be your default printer?", 292, "Default Printer Status")
      If mkDef = 6 Then
         WshNetwork.SetDefaultPrinter pname
         msgbox ("Printer " & pname & " Installed As Default Successfully.")
      Else
         msgbox ("Printer " & pname & " Installed Successfully.")
      End If 
    End Function

    </SCRIPT>
    <body>

    <p>&nbsp;</p>
    <table width="600" border="0" align="center" cellpadding="0" cellspacing="1">
      <tr>
        <td valign="top" bgcolor="#999999">
          <table width="600" border="0" cellspacing="1" cellpadding="0">
            <tr bgcolor="#AAAAAA">
              <td colspan="4"><table width="600" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="330"><strong><font size="1" face="helvetica, verdana, arial">&nbsp;Description- 4th Floor Printers</font></strong></td>
                    <td width="200"><strong><font size="1" face="helvetica, verdana, arial"> &nbsp;Printer
                          Name (Print Queue)</font></strong></td>
                    <td width="70"><strong><font size="1" face="helvetica, verdana, arial">&nbsp;</font></strong></td>
                    <td width="100">&nbsp;</td>
                  </tr>
                </table>
              </td>
            </tr>
     <tr bgcolor="#EBEBEB">
              <td width="330"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;Accounting</font></td>
              <td width="200"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">&nbsp;Acct</font></td>
              <td width="70" bgcolor="#FFFFFF">
                <div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
                  <input type="button" name="Button" value="Add" style="width:40; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:8pt; color:#000000; background-color:#E8E8E8;" onClick=addPrint('\\printeserver\printer')>
                  </font></div>
              </td>
              <td width="100" bgcolor="#FFFFFF"><div align="center"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
                  <input type="button" name="Button3" value="Remove" style="width:70; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:8pt; color:#000000; background-color:#E8E8E8;" onClick=delPrint('\\printserver\printer')>
                  </font></div>
              </td>


    So looking at my code can anyone tell me how I would launch this within the sharepoint web itself..

    TIA to any answers

    Ron