Jump to content

shuter

Member
  • Posts

    9
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by shuter

  1. Looks interesting. Thanks for sharing it- I will probably try it out this week!
  2. hasi001, I'm not aware of an easy way to get the OS version through a simple script. You can find out if the OS is NT or 9x based through the %OS% system variable (not set in 9x), though, and check the system variable %windir% to determine if the system is Windows NT/2000 or XP, assuming you installed the operating system to the default location ( c:\windows versus c:\winnt).
  3. Here is the information I import to setup proxy settings at work. You will have to substitute your own information, of course, and will need to import it during commandlines.txt if you wish it to apply to all users. Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] ; 0 turns off proxy, 1 enables it. "ProxyEnable"=dword:00000001 ; Input your proxy server and port below. "ProxyServer"="http=10.1.1.71:80" ; If necessary, input your exception list for internal addresses below. "ProxyOverride"="10.*;*.servername.*;<local>"
  4. cybri2k, I just tried a google search for "Installation Failed: E:\I386\asms" and it turned up a host of possible causes. You will probably want to try this yourself and try some of the common fixes.
  5. The other issue that you want to keep in mind is that Microsoft created separate "types" of keys for each shipped version of XP- for instance, an XP Pro Retail CD (full version) will not work with a key for XP Pro OEM, such as those attached to pc's, likewise a retail version of XP Pro Upgrade would not work with the other two. We had quite a few issues at work with creating a single Ghost image for all of our systems when we have various licenses on the client pc's.
  6. You could alternately log in as administrator but map to the network resource with the 'net use' command, using an account with the necessary domain rights. For example: net use p: \\myserver\public /user:mydomain\username mypassword Of course, if the batch file that you are calling needs to access other domain resources, this method would take additional work.
  7. Okay, the script will now take optional command line arguments. You will probably want to remark out (') the msgbox lines in order to run unattended. '******************************** 'Name: ForcePasswordChange.vbs 'Purpose: Force a local user account password ' change at the next signon '******************************** Dim objShell, compname, objUser, ArgObj On Error Resume Next ' *** Place the user account below *** 'objUser="Jet" ' *** Request user name (unless passed to the script as an argument)*** If Wscript.Arguments.Count <> 0 Then objUser=Wscript.Arguments(0) Else objUser=InputBox("Enter the user name:","Force Password Change") End If ' *** Get the local computer name *** Set objShell = CreateObject("wscript.Shell") compname = objShell.ExpandEnvironmentStrings("%COMPUTERNAME%") ' *** Bind to the user account and set the expired password flag *** Set UserObj = GetObject("WinNT://" & compname & "/" & objUser & ", User") If err.number <> 0 Then msgbox("You entered an invalid user. Exiting script...") Else UserObj.Put "PasswordExpired", CLng(1) UserObj.SetInfo Set UserObj = Nothing txtMsg="User " & objUser & " will now have to change " & vbcrlf txtMsg=txtmsg & "his password the next time he logs in." msgbox(txtMsg) End If You can pass the username as an argument from the command line or batch file like this: wscript "force password change.vbs" "Jet" Let me know if you have any problems.
  8. Try this. I added a simple input box and error trapping to verify that a valid user name was input. '******************************** 'Name: ForcePasswordChange.vbs 'Purpose: Force a local user account password ' change at the next signon '******************************** Dim objShell, compname, objUser On Error Resume Next ' *** Place the user account below *** 'objUser="Jet" ' *** Request user name *** objUser=InputBox("Enter the user name:","Force Password Change") ' *** Get the local computer name *** Set objShell = CreateObject("wscript.Shell") compname = objShell.ExpandEnvironmentStrings("%COMPUTERNAME%") ' *** Bind to the user account and set the expired password flag *** Set UserObj = GetObject("WinNT://" & compname & "/" & objUser & ", User") If err.number <> 0 Then msgbox("You entered an invalid user. Exiting script...") Else UserObj.Put "PasswordExpired", CLng(1) UserObj.SetInfo Set UserObj = Nothing txtMsg="User " & objUser & " will now have to change " & vbcrlf txtMsg=txtmsg & "his password the next time he logs in." msgbox(txtMsg) End If
  9. Have you thought of using a vbscript? '******************************** 'Name: ForcePasswordChange.vbs 'Purpose: Force a local user account password ' change at the next signon '******************************** Dim objShell, compname, objUser ' *** Place the user account below *** objUser="Jet" ' *** Get the local computer name *** Set objShell = CreateObject("wscript.Shell") compname = objShell.ExpandEnvironmentStrings("%COMPUTERNAME%") ' *** Bind to the user account and set the expired password flag *** Set UserObj = GetObject("WinNT://" & compname & "/" & objUser & ", User") UserObj.Put "PasswordExpired", CLng(1) UserObj.SetInfo Set UserObj = Nothing
×
×
  • Create New...