Jump to content

kevan79

Member
  • Posts

    17
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About kevan79

kevan79's Achievements

0

Reputation

  1. You are the MAN. THanks again.
  2. Ok I figured out why it's not logging off...I changed the orginal script Iceman posted from vbOkCancel to vbYesNo, and this makes the boxes Yes/No, but then the script does not act as it should, i.e. log people off...so, is there a 'correct' way to make the yes/no boxes so that it will log off people? If not, I guess Ok/Cancel will have to work, but Yes/No would be alot nicer. Thanks, Kevan
  3. Ok question. The script isn't logging people off...it works on my personal laptop at home. But it isn't logging off people off on Windows 2k3 Server or XP Pro laptops that are a member of the domain for some reason? ALso, in Group Policy, logon scripts are set to run synchrously (sp) but on XP domain members the scripts are running synchrously, i.e. the client boots all the way up into Windows, and they can just ignore the Yes/No boxes and click nothing. Any ideas on this? THanks, Kevan
  4. Ok, I'm at work now and I've obviously gotten soemthing wrong with the script. I get the Following error. Line 8, Char 4, invalid syntax. Code 800401E4, Source (null) Not sure what I'm doing wrong here if someone can look at the coding, that would be great.
  5. OK, I'm back to suck more knowledge from the board. I've found alot of this script from both microsoft and a couple websites. My questions is, how do I program it to read the OU name from, say column 1 of an Excel document? Also, if the OU didn't exist, is there a way for it to make it? Once again, thanks to all those that are so helpful on this board. Also, is there anything that I'm leaving out that really should be in there? NOTE: I've not gotten to test any of this out, as I'm working at it at home. 'script to read user information from an Excel File and add them to the domain Set objExcel = CreateObject("Excel.Application") Set objWorkbook = objExcel.Workbooks.Open _ ("C:\Scripts\New_users.xls") intRow = 2 Do Until objExcel.Cells(intRow,1).Value = "" Set objOU = GetObject("ou=Data, dc=deployed.af, dc=mil") Set objUser = objOU.Create _ ("User", "cn=" & objExcel.Cells(intRow, 1).Value) objuser.userPrincipalName = objExcel.cells(intRow, 9).value objUser.sAMAccountName = objExcel.Cells(intRow, 2).Value objUser.GivenName = objExcel.Cells(intRow, 3).Value objUser.SN = objExcel.Cells(intRow, 4).Value objUser.AccountDisabled = FALSE objuser.mail = objExcel.cells(intRow, 5).Value objUser.SetInfo intRow = intRow + 1 Loop objExcel.Quit
  6. Ah, so there is a limit...oh well. I knew about the interactive logon thing you were talking about, but that just gives the user the "OK" box, I'll have to talk to my bosses some more to see if it is ok to break the orginal message into 2 message boxes. Anyhow, Thanks alot for your help and I'm sure I'll be back on here asking more questions. Thanks again, Kevan
  7. Attachment of the file in .txt format...wouldn't let me upload the vbs file itself. test.txt
  8. Here it is Set WshShell = WScript.CreateObject("Wscript.Shell") intReturn = MsgBox ("THIS IS A DEPARTMENT OF DEFENSE COMPUTER SYSTEM. THIS COMPUTER SYSTEM, INCLUDING ALL RELATED EQUIPMENT,NETWORKS AND" & VBCRLF & _ "NETWORK DEVICES (SPECIFICALLY INCLUDING INTERNET ACCESS), ARE PROVIDED ONLY FOR AUTHORIZED U.S. GOVERNMENT USE." & VBCRLF & _ "DOD COMPUTER SYSTEMS MAY BE MONITORED FOR ALL LAWFUL PURPOSES, INCLUDING TO ENSURE THAT THEIR USE IS AUTHORIZED, FOR" & VBCRLF & _ "MANAGEMENT OF THE SYSTEM, TO FACILITATE PROTECTION AGAINST UNAUTHORIZED ACCESS, AND TO VERIFY SECURITY PROCEDURES," & VBCRLF & _ "SURVIVABILITY AND OPERATIONAL SECURITY. MONITORING INCLUDES ACTIVE ATTACKS BY AUTHORIZED DOD ENTITIES TO TEST OR" & VBCRLF & _ "VERIFY THE SECURITY OF THIS SYSTEM. DURING MONITORING, INFORMATION MAY BE EXAMINED, RECORDED, COPIED AND USED FOR" & VBCRLF & _ "AUTHORIZED PURPOSES. ALL INFORMATION, INCLUDING PERSONAL INFORMATION, PLACED ON OR SENT OVER THIS SYSTEM MAY BE" & VBCRLF & _ "MONITORED. USE OF THIS DOD COMPUTER SYSTEM, AUTHORIZED OR UNAUTHORIZED, CONSTITUTES CONSENT TO MONITORING OF THIS" & VBCRLF & _ "SYSTEM. UNAUTHORIZED USE MAY SUBJECT YOU TO CRIMINAL PROSECUTION. EVIDENCE OF UNAUTHORIZED USE COLLECTED DURING" & VBCRLF & _ "MONITORING MAY BE USED FOR ADMINISTRATIVE, CRIMINAL OR OTHER ADVERSE ACTION. USE OF THIS SYSTEM CONSTITUTES CONSENT TO" & VBCRLF & _ "MONITORING FOR THESE PURPOSES.", vbYesNo + vbExclamation, "DOD Consent to Monitoring") if intReturn = 2 then WshShell.Run "shutdown -l" ,,True if intReturn = 1 then wscript.quit It didn't post as nice in here...sorry about that...but as it stands right now, the message box cuts off the test towards the end at 'col' in the word collected. Thanks for helping out with this. Kevan
  9. I'm doign a VBscript for a log in and it's cutting off some of my message for the message box, though it works fine other than that... Note this is a VERY long message that is on several lines...and it just cuts off in the middle of a word... So, is there a limit? Is there a way around it? Any help is greatly appreciated. Thanks, Kevan
  10. Ok...this is going to sound crazy...but...I've got the code working...thank you alot for that...but is there a limit as too how many characters you can put into a message box? Reason being, it's cutting off my message right int he middle of a word. It works, but I just need more space...any tips/ideas? Thanks.
  11. Thanks alot, that works nicely...changed the Okcancel to Yesno and it is great...one question though... My text is too long to fit on one line, actually takes several...how do I wrap this so I don't get errors? Use & _ and then restart " and close with " again? Haven't had time to test it...just curious. Thanks again.
  12. Ok, basically I'm looking for a script that pops up a message box with yes/no boxes, if they click no, the user is logged off before they can actually get 'into' the OS. If yes, then it proceds and logs them onto the network. I know how to get the message box, but not sure how to code the yes/no and log off portion. Thanks, Kevan
  13. Hey, Sorry, but I don't have the time to research this nor do I have the knowledge...but... I need a script (vbs) that will run when the user attempts to log on and will require them to accept the 'terms and conditions', and if they do not, they can select "NO" and will be logged back off the network. Any help is greatly appreciated. Thanks, Kevan
  14. Yeah, that really looks nice, but again, it's an outside program, so it wouldn't be allowed. i.e. I can't use WIndows update itself and I can't use outside programs...has to basically be a script...and it sucks...but that's the rules I got to follow...if that makes any sense, which I know it don't.
×
×
  • Create New...