Deploy Printers In Sharepoint
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
** 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
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.
Thank you for the information. I will try what you have suggested.
- Email or post if you have any problems.... should be pretty easy.
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?
- Do you know how to create a list in sharepoint?
- No. I am very new at Sharepoint.
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.
- 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 - Install the standalone training on your desktop and run it from there, not on your wss server. (As suggested)
- 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). Where do I go to add "Hyperlink or Picture" field?
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.** 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.)
Chris - I just posted a walk-through on how to get around that... it should resolve your problem.
I am going to test this out and see how it works. Thank you for your help on this.- No problem. I just walked through each step and tested and it worked fine so you should have no troubles.
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?
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.
In order for mine to run I had to make it look like this:
start \\printeserver\prnt001
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.
- No sweat. You might help the next guy out and mark the appropraite post as the solution to your problem though...
I just did. Thanks again.
- Thanks Jon!
- 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> </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"> Description- 4th Floor Printers</font></strong></td>
<td width="200"><strong><font size="1" face="helvetica, verdana, arial"> Printer
Name (Print Queue)</font></strong></td>
<td width="70"><strong><font size="1" face="helvetica, verdana, arial"> </font></strong></td>
<td width="100"> </td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#EBEBEB">
<td width="330"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> Accounting</font></td>
<td width="200"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> 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 - hi.. can someone please help me with an issue or at least point me in the right direction. this is what i need to do, i need to place my companies floor plan (which i have already) in Sharepoint, and in the map place printer icons, so that users can click on the printers and it will be installed on their pcs. Can someone please help me how to go about this. The help is greatly appreciated
- This is something that I achieved a while ago and was supposed to make a blog post on for EndUserSharePoint but have been way too busy lately so I'll give you a quick run-though of how to achieve this.
You will need: Visio to create your floor plans and the visio viewer install on all client machines. I also install the printers through a small vbs script and have a document library in my top-level site that holds all of these scripts (you'll see why soon)
Create a new vbs file with:
' Printers.vbs - Windows Logon Script. Set objNetwork = CreateObject("WScript.Network") objNetwork.AddWindowsPrinterConnection "\\SERVERNAME\PRINTERNAME"and then save this as PRINTERNAME.vbs
You will need a script for each printer. Once they have been created, upload them to your document library.
Create floor plan:
Create your floor plan in Visio and add the printer symbols appropriately.
Now you need to turn those symbols into hyperlinks. Do this by right-clicking the printer symbol and select Hyperlink from the menu.
Type in the URL to the relevant script in your document library and click OK. Save the visio file.
Note that if you have multiple floors, you can add each floor plan into it's own page within your visio file (rename the pages accordingly)
Upload this visio file to the document library.
Configure SharePoint page:
Browse to the page you want to display the floor plan and click on Site Actions | Edit Page
Add a content editor web part to this page.
View the source of the web part and paste in:
Customise the CEWP as you need and click OK.<OBJECT classid="CLSID:279D6C9A-652E-4833-BEFC-312CA8887857" codebase="http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=d88e4542-b174-4198-ae31-6884e9edd524&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f6%2ff%2f5%2f6f569198-e7d0-49af-b162-54a11f38d301%2fvisioviewer.exe" id="viewer1" width="100%" height="500"> <param name="BackColor" value="16777120"> <param name="AlertsEnabled" value="1"> <param name="ContextMenuEnabled" value="1"> <param name="GridVisible" value="0"> <param name="HighQualityRender" value="1"> <param name="PageColor" value="16777215"> <param name="PageVisible" value="1"> <param name="PropertyDialogEnabled" value="1"> <param name="ScrollbarsVisible" value="1"> <param name="ToolbarVisible" value="1"> <param name="SRC" value="http://YOUR VISIO FILE"> <param name="CurrentPageIndex" value="0"> <param name="Zoom" value="-1"> </object>
Now when the page refreshes, you should see your visio diagram (assuming of course you have the visio viewer installed). If you created multiple pages, then these will be shown at the bottom of the diagram. When you click a printer symbol, it should fire up the vbs and install the printer.
That should be all you need.
Hope this helps!
Dave.
SharePoint Administrator | SharePoint Fan www.davepyett.wordpress.com - Follow me on twitter: twitter.com/dpyett
