Monday, June 29, 2009

Add a link inside the webdeleted page

One annoying thing when you delete a site in SharePoint is the page that you are directed to after the deletion, the webdeleted.aspx. For me it is easy, since I know that you must go up into the URL and delete from a certain slash to get back to the site above, but for the user... no not as easy.

So I thought that putting a link that redirects you up one level OR a link that simply closes the window would be great. Well it was easy made and delivers a really good result as well - if I may say so myself, and yes I may! :D

Remember to copy this page before editing it. And yes it will be overwritten maybe, but those are a few lines, not that hard to remember if that might happen. AND yes I want it to be used on ALL sites.

Find the webdeleted.aspx page
Copy and paste a copy inside the folder, just to be safe :)
Open the file in good old Notepad
Add the two following simple links above the last /font tag. One link is a javascript that closes the window and the other link brings you back to the site above and that is done with ../../ tag:

Do NOT enter an entire path, only relative URLs! What this link does, is redirecting you back one level up to the parent site. That will work from any starting point. Now your "Delete web" looks like this instead of a blank page:

Monday, June 22, 2009

Setup the VPC to use your wireless network

Today I tried to install a Cisco VPN client on my laptop which has Vista 64 installed. I know, but it was not my choice to install Vista, it is my work laptop. So, turns out that there is no client for this, and maybe they will not release one either. So, to be able to connect to a customer with this laptop I thought that I would use my VPC. I changed the settings in my VPC to use the wireless network that I use. Did not work. So I googled it, and this article was really helpful. Turns out that you can install a lookback adapter as a new network connection, and then let that network connection use your physical network connection (the wireless). And only allow that adapter to use the network connection (it does not say that in the article, but it is a setting in Vista). And, yes, I now had network connection in my VPC! I only had to download a cisco client that can be installed on Windows Server 2003 (I used version 4.8.00 but I will not write here were I found it....). You understand! :D

Friday, June 12, 2009

Script that delete old backup folders

Yey! If you want to save the server administrator (speaking!) some hell by deleting old backup folders and save disk space, then this is a solution for you!

Create a new file with Notepad and name it like deletebackupfiles.vbs and paste the following code (I cannot write the code here of course, but you can copy the code from the site

Edit the number of days on the first line, that is how old files you want to delete from the backup share. Then on the next line, enter the path to your share where the backup files are.

Remove the ' sign before "objFile.Delete" so that the script executes the deletion :)
Put a ' sign before the MsgBox instead, or else you must press OK to every file it wants to delete.
Then, create a new file with Notepad and name that deletebackup.bat (or what ever) and enter one line to it, and that is the path to your vbs file:


Open Task Scheduler on your server and create a new task where you want your .bat file to start at a scheduled time. I run it the night before my fullbackup creates new folders, so that the backup share is empty.

Wednesday, June 3, 2009

Use a SQL data connection in InfoPath

If you want to receive data from a SQL table directly into a field in InfoPath then do the following. First, create a new library in your SharePoint site using the template ”Data connections library”:

Name the library like "SQLConnections" or something. (Choose not to display it in your QuickLaunch if you want to hide this library):

Open InfoPath and open the form in which you want your new data connection (or you can open a blank form and do the same thing there). Click on "Tools" and "Data connections" and create a new SQL database connection:

Connect to your SQL server:

Select the database:

Finish and your data connection is added. Now, click on "Convert" button:

Enter the URL of your SharePoint site and the Data Connection library that you created before. Remove the "Forms/Allitems.aspx" at the end of the URL and replace that with a filename instead, for example "myconnection.udcx":

When you finish, you'll see that the "Convert" button is grey. Press Close to return to the form:

Go to your field where you want to display data from the data connection source:

Publish it and test it in your browser: