Archive for category Scripts
Internet Explorer 7 Search Provider Import/Export
I recently came across a computer that for no good reason would seem to allow me to change or add a search provider. When I would attempt to add a provider to the search bar (since google is tons better than the default; windows live) it would cause a fatal exception and close Internet Explorer. After a ton of searching, I could not find this anywhere on the internets so i think it is worth posting here.
Read the rest of this entry »
Static and DHCP IP Address Changes Through Scripts
I have a office that uses static IP addresses at the location. The manager just got a laptop that he wants to use at the office and at his house the same static address does not work. So I made him two batch files so he can easily switch between a static IP address in the office and a dynamic IP address at home. I was thinking that this could be helpful for making sure everyone in a office is using DHCP and no one is statically assigned. It could also be really useful for changing say the DNS server address on a set of computers automatically through a login script or kaseya.
It is a super simple script. The name of the network adaptor must be changed to match the name of the network adaptor you wish to modify settings for.
Read the rest of this entry »
All about the Shutdown Command
The ability to restart and shutdown computers automatically or remotely is key to completing installs, fixing issues, or just having a hell of a time messing with end users. In this post ill detail all the switches and uses of the shutdown command.
For anyone that is not familiar with the command ‘shutdown’, it is a windows/dos function that controlls the the shutdown, logoff and restart of a compiter or server either locally or remotely.
Here are the switches
Change Windows Firewall From Command Line or Batch File
I have a set of scripts I run when I prep a computer for deployment. At specific points applications require that the windows firewall be turned off in order to install correctly. This is namely ACT! and imagine time. They use a bunch of odd ports during install, so their documentation tells you to just turn off the firewall. Well here is what I found with a little research. From run or in a batch file there is a simple netsh command to disable the firewall and one to again enable it.
Read the rest of this entry »
Automatically Remove Windows Search 4.0
Microsoft has a funny way of sneaking ‘features’ in with patches. In this case Windows Search 4.0 is not really a feature as much as a problem. It was installed on a few of the networks I support as part of our weekly patching, and the next day I got a bunch of calls about reduced performance. I figured that people would complain until it finished indexing. Not the case, it seemed to cripple computers and crush servers. It indexed to the point of actually leaving no resources for users to authenticate to one of our terminal servers. I started looking for a fix and came up with this:
Read the rest of this entry »
Make a Local User Account With VBS
Posted by admin in Kaseya, Scripts, Visual Basic Script (vbs) on March 18, 2010
I deployed a bunch of new computers to a network using terminal services. Since the real authentication is at the server we standardize the local computer login to the username user1 and the password user1, just to keep things simple. So I needed a easy way to create this account locally on 30+ workstations. Here is what I came up with:
Read the rest of this entry »
Service Pack 3 Rollout Options Switches and Scripts
Okay so Service Pack 3. Scary I know, I am always weary of big service pack rollouts. However if you don’t update to SP3, you are open to contracting some nasty bugs. Here are some simple install possibilities if you don’t have it on your network yet. I suggest that you take a look at some of the install articles on SP3 and some of the complications people have experienced before doing a mass rollout. Below are some options that might be helpful to you, but as always test on a few computers before rolling out to a bunch. You might also want to check out this link for a explanation of the switches and arguments for installation. In my scripts below the switches I use will force all aplications closed, and do a backup of of the replaced files, and make a log. A progress window is displayed during the install and at the end the computer is rebooted. I found this to be the best option for rollouts as you can see the progress bar to estimate time remaining, and you do have a log and a backup if things go wrong. I suggest you find the right mix of switches that work for you though.
Read the rest of this entry »
Inserting a Wait in a Batch File, Using Netstat in a Login Script
So you want to pause a batch file for a few seconds. Unfortunately windows doesn’t provide a very simple way of doing this. I wanted to run ‘netstat -b’ 25 seconds after a user logged into their computer as to give the computer enough time to start up all background applications. But, there is no wait function in batch files. Well I found a workaround. If you use the ‘-n’ argument with the ping command you can specify the amount of time to run a ping for. Thus ping -n 60 127.0.0.1 will ping your local host for 60 seconds. This will more or less keep the batch file at a standstill for a specified number of seconds before continuing. In my case I used it for a pause in a login script.
Read the rest of this entry »