So the reason for this article is in the past each time I wanted to use STSADM, I had to open a command prompt, get to the directory where the file is stored (Usually in - C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN). To get to this directory and then start using commands is a real pain to do each time you want to use the tool. If you are like me you also have a SharePoint Farm with like 3-5 servers and on each server you have to run the tool and have to get to the command line directory. It is time consuming and there is a much easier way to use the STSADM command.
So the first fix that I created was a simple desktop shortcut that takes me to the command prompt at the directory (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN). This is one way to get to the STSADM command quickly. To create this shortcut; follow these steps:
Login to the SharePoint 2007 Server
Right Click on the Desktop
Click New
Click Shortcut
Click Browse
Click Computer>>C:\>>Windows>>System32>>Cmd.exe
Click OK
Click Next
Name the File (STSADM, is what I used)
Click Finish
Right Click the Shortcut you just created
Click Properties
Click the Start in text box and Paste the STSADM path (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN)
Click OK
Now when you double click the STSADM shortcut it will open a command prompt in the proper directory so you can easily run STSADM commands on your SharePoint server. Don't forget to do this on every one of your SharePoint servers in your SharePoint Farm.
There is another method that might be easier, I am still not sure which option is the best/easiest. The second option is to add the STSADM directory (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN) to your path. To do this; follow these steps:
Login to your SharePoint 2007 Server
Click Start
Right Click My Computer
Click Properties
Click the Advanced Tab
Click Environment Variables Button
Click Path in the System Variables Section (it will highlight it in blue)
Click Edit
Click Variable Value Text box and go to the end of the line
Type ; (the actual symbol) and paste the path for your STSADM command (Should be - C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN)
Click OK
Click OK
Click OK
Click Start
Click Run
Type CMD
Hit Enter
Run a simple STSADM command as a test (It should work)
This second option gives you the ability to run the STSADM command from the default command prompt without having to navigate to the path of the STSADM command. So no more typing the entire directory path each time you want to use STSADM command.
Either one of these methods will get you to the same goal, which is to save you time when trying to run your STSADM commands. No more having to remember the directory and spend time getting to the location of the actual STSADM.exe file. You can use either method, there isn't really a better reason to use one vs. the other, they both work and are both simple to use and should really raise any security concerns on the system.
Well I hope this guide and screenshots help you to save time when trying to run STSADM commands for SharePoint 2007.
Published by TechTips
I am a senior systems engineer and enjoy writing articles about computers, technology and other electronics. View profile
Open a Command Prompt Window in Under 2 SecondsHave you ever tried to open a command prompt window? Do you know what a command prompt window is? Answer to this question will be 'Yes' or 'No' for some and 'what's that?' for o...- How to Launch Command Prompt with Right ClickThis article discusses how to launch command prompt with a right click.
- FROM the COMMAND PROMPT:COMPUTER HELP
- TechTips -MOSS 2007 SharePoint People Picker Not Working
- Secure SharePoint Sites: How to Setup Your Site to Restrict Access Through FrontPage
- Microsoft to Authorize Third-party Licensing of SharePoint, Other Communications T...
- The Evolution of Intranet & Intranet Security
- Introduction to Wireless Networking
- Web Hosting for Non-Geeks
- Introduction to PHP




