Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by fr8o

  1. fr8o

    Check OS version for script compatability

    Wouldn't you know right after I posted I found a snippet of code that did the trick, ideas on anything to make this smoother though would be nice: Set oShell = CreateObject("Wscript.Shell") strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\"...
  2. fr8o

    Check OS version for script compatability

    Here is what I have, it works great if you remove the attempt to setup the if statement, but as windows 2000 and xp SP1 do not have powercfg I have to find a way to limit which version of windows this runs on. I am still in a position of no formal training in vb so I am just hacking this out...
  3. fr8o

    Local Password change

    AH ha got it all together now and sorry about the mess: '| /p:newPass4LocalAdministrator Set objNetwork = WScript.CreateObject("WScript.Network") sUser = objNetwork.UserName VerifyGroupMembers = False Set objGroup = GetObject("WinNT://./Administrators,group") For Each...
  4. fr8o

    Local Password change

    I went this route: Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Dim l As Long Dim sUser As String sUser = Space$(255) l = GetUserName(sUser, 255) 'strip null terminator If l <> 0 Then GetCurrentUserName =...
  5. fr8o

    Local Password change

    I wanted to document the proper usage of the variable for future is all. I was able to get this working correctly, some people got irritated because they did not have local admin rights so it threw up all over them. So does any know a way of checking "Am I a member of local administrators?
  6. fr8o

    Local Password change

    Haveing never worked with VB, but having perl and java exp I tried my hand at a script to change the local password on machine I came up with this: '| /p:newPass4LocalAdministrator Option Explicit: Dim Named, sPasswrdAdmin, oUser Set Named = WScript.Arguments.Named sPasswrdAdmin =...

Part and Inventory Search

Back
Top