Page 1 of 2
Anybody here can give me some VB Script advice?
Posted: Mon Apr 11, 2005 5:11 pm
by Duhard
here's the deal...
I need to write all Administrators group users in a .txt file named "admin.txt" using LDAP...then I need to save it on the root drive (C:/).
Now this must be a joke to some of you but since I'm a noob I need some help.
Thanks
Posted: Mon Apr 11, 2005 5:15 pm
by R00k
Posted: Mon Apr 11, 2005 5:18 pm
by R00k
Posted: Mon Apr 11, 2005 5:51 pm
by denzii
Code: Select all
Private fso As New FileSystemObject
Private strm As TextStream
Set strm = fso.CreateTextFile("\admin.txt", True)
With strm
.WriteLine Text1.Text
.Close
End With
Posted: Mon Apr 11, 2005 6:16 pm
by Tormentius
Here is what you're looking for Duhard.
Posted: Mon Apr 11, 2005 6:46 pm
by denzii
Oh boy, was I way off.
I thought you just wanted to save a text file..... sorry about that.
Re: Anybody here can give me some VB Script advice?
Posted: Mon Apr 11, 2005 7:12 pm
by Freakaloin
Duhard wrote:here's the deal...
I need to write all Administrators group users in a .txt file named "admin.txt" using LDAP...then I need to save it on the root drive (C:/).
Now this must be a joke to some of you but since I'm a noob I need some help.
Thanks
is this a joke?
Posted: Mon Apr 11, 2005 7:13 pm
by GONNAFISTYA
Fuckin hell Duhy went and turned all nerd on us.
Ban the fucker.
Posted: Tue Apr 12, 2005 1:33 am
by hate.
better nerd
than fatt
Posted: Tue Apr 12, 2005 1:54 am
by stocktroll
Code: Select all
string Duhard = "pathetic noob\n";
Posted: Tue Apr 12, 2005 2:39 am
by Duhard
Tormentius wrote:Here is what you're looking for Duhard.
Thanks man

Re: Anybody here can give me some VB Script advice?
Posted: Tue Apr 12, 2005 2:40 am
by Duhard
Freakaloin wrote:Duhard wrote:here's the deal...
I need to write all Administrators group users in a .txt file named "admin.txt" using LDAP...then I need to save it on the root drive (C:/).
Now this must be a joke to some of you but since I'm a noob I need some help.
Thanks
is this a joke?
...are you gay?
Posted: Tue Apr 12, 2005 2:40 am
by Duhard
GONNAFISTYA wrote:Fuckin hell Duhy went and turned all nerd on us.
Ban the fucker.
I'm no nerd you fucktards....It's called having a job to do...nerds.
Posted: Tue Apr 12, 2005 3:59 am
by Tormentius
Duhard wrote:Tormentius wrote:Here is what you're looking for Duhard.
Thanks man

You're welcome.
Posted: Tue Apr 12, 2005 4:56 am
by Duhard
Posted: Tue Apr 12, 2005 12:20 pm
by Freakaloin
Duhard wrote:GONNAFISTYA wrote:Fuckin hell Duhy went and turned all nerd on us.
Ban the fucker.
I'm no nerd you fucktards....It's called having a job to do...nerds.
lol...having a job to do...so its not an actual job...lol...moron...u can't even get a job...and i don't want want...CRUSHED...
Posted: Wed Apr 13, 2005 4:03 pm
by Duhard
Freakaloin wrote:Duhard wrote:GONNAFISTYA wrote:Fuckin hell Duhy went and turned all nerd on us.
Ban the fucker.
I'm no nerd you fucktards....It's called having a job to do...nerds.
lol...having a job to do...so its not an actual job...lol...moron...u can't even get a job...and i don't want want...CRUSHED...
I have a job to do and I can't get a job?
ffs make sense you fucktard...
Posted: Wed Apr 13, 2005 4:42 pm
by Freakaloin
job to do...job...different...u...moron...
Re: Anybody here can give me some VB Script advice?
Posted: Wed Apr 13, 2005 5:21 pm
by Foo
Duhard wrote:here's the deal...
I need to write all Administrators group users in a .txt file named "admin.txt" using LDAP...then I need to save it on the root drive (C:/).
Now this must be a joke to some of you but since I'm a noob I need some help.
Thanks
Ey bud, much simpler to do it with the dsquery command.
like this:
dsquery user OU=Security,DC=YOUR_DOMAIN,DC=YOUR_DOMAIN_SUFFIX > admins.txt
Of course, this assumes all your admins are in the security container as they should be

Posted: Wed Apr 13, 2005 5:22 pm
by Foo
BTW that's a command you can launch from any server or terminal server, from the command prompt.
it's not on a regular workstation without some fag admin pack.
Posted: Wed Apr 20, 2005 6:48 pm
by Duhard
well...anybody here nerdish enough to figure this out?
In the registry, I must create 2 keys (UserName and Group) in the following location...HKCU\Software\NerdishVBS
...I ain't got time for this shit...time to hit the gym and fuck your girlfriends, loosers.
P.S Visual Basic only please...thanks.
Posted: Wed Apr 20, 2005 6:51 pm
by Duhard
Tormentius you faggot...where are you?
Posted: Wed Apr 20, 2005 6:53 pm
by Freakaloin
'©2003 Prentice Hall
'By Geoff Leach
'Created/Revised: 04/20/05
'Procedure for calculating a loan payment.
Public Class Form1
Inherits System.Windows.Forms.Form
Friend sngPrincipal As Single
Friend sngRate As Single
Friend intTerm As Integer
#Region "Data Validation"
Private Sub txtPrincipal_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtPrincipal.Validating
Try
If Val(txtPrincipal.Text) < 2000 Or Val(txtPrincipal.Text) > 50000 Then
Throw New Exception
End If
Catch ex As Exception
'Cancel the event and select the text to be corrected by the user
e.Cancel = True
txtPrincipal.Select(0, txtPrincipal.Text.Length)
MsgBox("The loan amount must be a number between 2000 and 50000.", MsgBoxStyle.Critical, "Invalid Entry!")
End Try
End Sub
Private Sub txtRate_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtRate.Validating
Try
If Val(txtRate.Text) < 0.025 Or Val(txtRate.Text) > 0.125 Then
Throw New Exception
End If
Catch ex As Exception
'Cancel the event and select the text to be corrected by the user.
e.Cancel = True
txtRate.Select(0, txtRate.Text.Length)
MsgBox("The loan rate must be a decimal value greater then zero and less than 12.5%.", MsgBoxStyle.Critical, "Invalid Entry!")
End Try
End Sub
Private Sub txtTerm_Validating(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles txtTerm.Validating
Try
If Val(txtTerm.Text) < 1 Or Val(txtTerm.Text) > 10 Then
Throw New Exception
End If
Catch ex As Exception
'Cancel the event and select the text to be corrected by the user.
e.Cancel = True
txtTerm.Select(0, txtTerm.Text.Length)
MsgBox("The loan term must be at least 1 and not more than 10.", MsgBoxStyle.Critical, "Invalid Entry!")
End Try
End Sub
#End Region
#Region "Procedures"
Sub CalculatePayment()
'Assign values to variables
sngPrincipal = Val(txtPrincipal.Text)
sngRate = Val(txtRate.Text) / 12
intTerm = Val(txtTerm.Text) * 12
'Call the LoanPayment function
lblMonthlyPayment.Text = Format(LoanPayment(sngPrincipal, sngRate, intTerm), "Currency")
End Sub
Function LoanPayment(ByVal Principal, ByVal Rate, ByVal Term) As Decimal
'Calculate the monthly payment, and return the value to the calling procedure.
Return Principal * (Rate / (1 - (1 + Rate) ^ -Term))
End Function
Friend Sub AppExit()
Dim intResponse As Integer
intResponse = MsgBox("Do you really want to exit this application?", 276, "Exit?")
If intResponse = 6 Then
End
End If
End Sub
#End Region
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Friend WithEvents mnuFile As System.Windows.Forms.MenuItem
Friend WithEvents mnuFileCalculate As System.Windows.Forms.MenuItem
Friend WithEvents mnuFileExit As System.Windows.Forms.MenuItem
Friend WithEvents lblPrincipal As System.Windows.Forms.Label
Friend WithEvents lblRate As System.Windows.Forms.Label
Friend WithEvents lblTerm As System.Windows.Forms.Label
Friend WithEvents txtPrincipal As System.Windows.Forms.TextBox
Friend WithEvents txtRate As System.Windows.Forms.TextBox
Friend WithEvents txtTerm As System.Windows.Forms.TextBox
Friend WithEvents lblPayment As System.Windows.Forms.Label
Friend WithEvents lblMonthlyPayment As System.Windows.Forms.Label
Friend WithEvents btnCalculate As System.Windows.Forms.Button
Friend WithEvents lblCopyright As System.Windows.Forms.Label
Friend WithEvents btnExit As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.mnuFile = New System.Windows.Forms.MenuItem
Me.mnuFileCalculate = New System.Windows.Forms.MenuItem
Me.mnuFileExit = New System.Windows.Forms.MenuItem
Me.lblPrincipal = New System.Windows.Forms.Label
Me.lblRate = New System.Windows.Forms.Label
Me.lblTerm = New System.Windows.Forms.Label
Me.txtPrincipal = New System.Windows.Forms.TextBox
Me.txtRate = New System.Windows.Forms.TextBox
Me.txtTerm = New System.Windows.Forms.TextBox
Me.lblPayment = New System.Windows.Forms.Label
Me.lblMonthlyPayment = New System.Windows.Forms.Label
Me.btnCalculate = New System.Windows.Forms.Button
Me.btnExit = New System.Windows.Forms.Button
Me.lblCopyright = New System.Windows.Forms.Label
Me.SuspendLayout()
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFile})
'
'mnuFile
'
Me.mnuFile.Index = 0
Me.mnuFile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuFileCalculate, Me.mnuFileExit})
Me.mnuFile.Text = "&File"
'
'mnuFileCalculate
'
Me.mnuFileCalculate.Index = 0
Me.mnuFileCalculate.Text = "C&alculate"
'
'mnuFileExit
'
Me.mnuFileExit.Index = 1
Me.mnuFileExit.Text = "E&xit"
'
'lblPrincipal
'
Me.lblPrincipal.Location = New System.Drawing.Point(64, 40)
Me.lblPrincipal.Name = "lblPrincipal"
Me.lblPrincipal.Size = New System.Drawing.Size(112, 16)
Me.lblPrincipal.TabIndex = 0
Me.lblPrincipal.Text = "Amount to Borrow:"
Me.lblPrincipal.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'lblRate
'
Me.lblRate.Location = New System.Drawing.Point(64, 72)
Me.lblRate.Name = "lblRate"
Me.lblRate.Size = New System.Drawing.Size(112, 16)
Me.lblRate.TabIndex = 1
Me.lblRate.Text = "Annual Interest Rate:"
Me.lblRate.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'lblTerm
'
Me.lblTerm.Location = New System.Drawing.Point(112, 104)
Me.lblTerm.Name = "lblTerm"
Me.lblTerm.Size = New System.Drawing.Size(64, 16)
Me.lblTerm.TabIndex = 2
Me.lblTerm.Text = "Loan Term:"
Me.lblTerm.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'txtPrincipal
'
Me.txtPrincipal.Location = New System.Drawing.Point(200, 40)
Me.txtPrincipal.Name = "txtPrincipal"
Me.txtPrincipal.Size = New System.Drawing.Size(120, 20)
Me.txtPrincipal.TabIndex = 3
Me.txtPrincipal.Text = ""
'
'txtRate
'
Me.txtRate.Location = New System.Drawing.Point(200, 72)
Me.txtRate.Name = "txtRate"
Me.txtRate.Size = New System.Drawing.Size(120, 20)
Me.txtRate.TabIndex = 4
Me.txtRate.Text = ""
'
'txtTerm
'
Me.txtTerm.Location = New System.Drawing.Point(200, 104)
Me.txtTerm.Name = "txtTerm"
Me.txtTerm.Size = New System.Drawing.Size(120, 20)
Me.txtTerm.TabIndex = 5
Me.txtTerm.Text = ""
'
'lblPayment
'
Me.lblPayment.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblPayment.Location = New System.Drawing.Point(72, 136)
Me.lblPayment.Name = "lblPayment"
Me.lblPayment.Size = New System.Drawing.Size(104, 16)
Me.lblPayment.TabIndex = 6
Me.lblPayment.Text = "Monthly Payment:"
Me.lblPayment.TextAlign = System.Drawing.ContentAlignment.MiddleRight
'
'lblMonthlyPayment
'
Me.lblMonthlyPayment.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblMonthlyPayment.Location = New System.Drawing.Point(200, 136)
Me.lblMonthlyPayment.Name = "lblMonthlyPayment"
Me.lblMonthlyPayment.Size = New System.Drawing.Size(120, 16)
Me.lblMonthlyPayment.TabIndex = 7
'
'btnCalculate
'
Me.btnCalculate.Location = New System.Drawing.Point(352, 168)
Me.btnCalculate.Name = "btnCalculate"
Me.btnCalculate.Size = New System.Drawing.Size(80, 24)
Me.btnCalculate.TabIndex = 8
Me.btnCalculate.Text = "C&alculate"
'
'btnExit
'
Me.btnExit.Location = New System.Drawing.Point(368, 200)
Me.btnExit.Name = "btnExit"
Me.btnExit.Size = New System.Drawing.Size(64, 24)
Me.btnExit.TabIndex = 9
Me.btnExit.Text = "E&xit"
'
'lblCopyright
'
Me.lblCopyright.Location = New System.Drawing.Point(8, 240)
Me.lblCopyright.Name = "lblCopyright"
Me.lblCopyright.Size = New System.Drawing.Size(384, 16)
Me.lblCopyright.TabIndex = 10
Me.lblCopyright.Text = "©2003 Prentice Hall. Programming with Visual Basic.NET for Business."
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(456, 266)
Me.Controls.Add(Me.lblCopyright)
Me.Controls.Add(Me.btnExit)
Me.Controls.Add(Me.btnCalculate)
Me.Controls.Add(Me.lblMonthlyPayment)
Me.Controls.Add(Me.lblPayment)
Me.Controls.Add(Me.txtTerm)
Me.Controls.Add(Me.txtRate)
Me.Controls.Add(Me.txtPrincipal)
Me.Controls.Add(Me.lblTerm)
Me.Controls.Add(Me.lblRate)
Me.Controls.Add(Me.lblPrincipal)
Me.Menu = Me.MainMenu1
Me.Name = "Form1"
Me.Text = "Loan Function Application"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub btnCalculate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
CalculatePayment()
End Sub
Private Sub mnuFileCalculate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuFileCalculate.Click
CalculatePayment()
End Sub
Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click
AppExit()
End Sub
Private Sub mnuFileExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuFileExit.Click
AppExit()
End Sub
End Class
Posted: Wed Apr 20, 2005 6:55 pm
by Duhard
what the heck am I looking at?
I seriously hope you're not the moron who built this shit script...wow...ultimate nerd alert
Posted: Wed Apr 20, 2005 6:56 pm
by denzii
VBS or VB
I have a module here you can alter to do what you want it to do if you wish, but it's in VB6