Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Help! urgent need of script sample

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,63793
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Help! urgent need of script sample
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Help! urgent need of script sample - 8/26/2008 12:22:27 AM   
  hector004

 

Posts: 2
Score: 0
Joined: 8/26/2008
Status: offline
Hello,

First off I am a total n00b and have no scripting backround what so ever.
Now that that is out of the way, I have a need to write a script that will check domain membership on the local computer, then if the domain = "my Domain" execute "setup"
else exit



Any help down the right path is greatly appreciated
Tito
 
 
Post #: 1
 
 RE: Help! urgent need of script sample - 8/26/2008 1:04:51 AM  1 votes
  DiGiTAL.SkReAM


Posts: 1184
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
Do some research on the following:

set oNet = createobject("wscript.network")
sMyStringVariable = oNet.userdomain
wscript.echo sMyStringVariable

also,

if sText = "test1" then
    wscript.echo "Test 1 found!"
else
    wscript.echo "Test 1 was NOT found!"
end if



_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to hector004)
 
 
Post #: 2
 
 RE: Help! urgent need of script sample - 8/26/2008 1:11:22 AM   
  hector004

 

Posts: 2
Score: 0
Joined: 8/26/2008
Status: offline
Thanks!!! this is a good general starting point for me. unfortunately I can't really spend a ton of time learning VB in order to accomplish my task so hopefully I can work it out.

So far I cannot even get it to echo test 1 found no matter the stext value

(in reply to hector004)
 
 
Post #: 3
 
 RE: Help! urgent need of script sample - 8/26/2008 4:06:29 AM   
  DiGiTAL.SkReAM


Posts: 1184
Score: 7
Joined: 9/6/2005
From: Florida, USA
Status: offline
Go ask on experts-exchange.  They'll write the code for you.
Or, you could take what I showed you, and look up the various commands in the docs, as well as look at other generic scripts others have posted in hte forums to learn VBS enough tog et done what you need to get done.
I don't have the time to write your script for you.

_____________________________

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

"It is better to die like a tiger, than to live like a pussy."
-Master Wong, from Balls of Fury

(in reply to hector004)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Help! urgent need of script sample Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts