Posts Tagged Login Script
How to Add and Remove a Local Account from a Group
Posted by admin in Kaseya, Scripts, Visual Basic Script (vbs) on April 27, 2010
Occasionally you may need to add a local user account to the local administrators group for a software install or temporary maintenance. The following vbs script can be used to add the local ‘user1’ account to the local ‘administrators’ group. Any user can be added to any local group, change the red to match your needs. The computer name is pulled from the workstation dynamically so this is also completely portable and can be run on any computer.
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 »