Showing posts with label VBscript. Show all posts
Showing posts with label VBscript. Show all posts

Monday, September 20, 2010

VBScript - Change your list seperator/delimiter

Depending on what I'm doing I like to change my list separator accordingly. Sometimes I need to create/open a .csv file except I don't want comma's to be the seperator in that file. Other times I do... So I decided instead of having to constantly go into the control panel and change my settings I just created two scripts. One with "|" as the list seperator and another with the standard comma.

What this script does exactly is goes into the registry and overwrites the current list separator with the one provided. Just change the highlighted value from a , to whatever you'd like.

const HKEY_CURRENT_USER = &H80000001
strComputer = "."
 Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strValue = ","
oReg.SetStringValue HKEY_CURRENT_USER,
Control Panel\International,sList,strValue





Of course this is just a standard registry string creation script so it can be modified to do endless things with. Get creative but please know what you're doing. Messing around in the registry can be nice, but it can also be very dangerous.

 
 Requirements:
Windows XP or newer


As always all questions and comments are welcome and appreciated. Thank you and god bless.

Monday, September 13, 2010

VBscript - Gather All local users and group members

I created THIS SCRIPT to help audit who has access to a list of servers and what level of access they have. What this script does is read a text file (servers.txt) and outputs a .csv file listing all local accounts and all groups with their members along with if the account is enabled or disabled. It also creates a compare list of all the administrators so if the script is run once a week/month or what-not you are provided with a list of the New administrators of that time period which is created in a separate .csv called New Admins(date).csv

I do my best to keep these scripts easy to read and easy to modify as desired, however it is highly recommended that you are aware of what exactly each and every script you execute is performing.

 Requirements:
Windows 98 or newer


As always all questions and comments are welcome and appreciated. Thank you and god bless.

Disclaimer: Your use of the information contained in this blog, is solely at your own risk. All information provided on this blog and in its downloads are "as -is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement. Further, we shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.