myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Executing a vbscript that exits after a reaches a condition

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Scripting Technologies] >> VB Script >> Executing a vbscript that exits after a reaches a condition Page: [1]
Login
Message << Older Topic   Newer Topic >>
Executing a vbscript that exits after a reaches a condi... - 5/15/2008 5:27:30 PM   
ghernandez211

 

Posts: 17
Score: 0
Joined: 5/15/2008
Status: offline
I currenlty have a login script on in my network which maps users share according to thier membership in active directory.
Now what I want to do is modify that login script so that when a certain user group that logs in it exits according to that condition which will call a different vbs script entirely that is based on that group alone. The condition will be If inGroup( "For example") then
wshshell.run "\\run this script\ etc\etc.  
Now there is more lines of code within this vb script therefore once it reaches this line of code I want it to exit the vbscript entirely and not continue running the rest down.  I would appreciate any help. Thanks in advance.

< Message edited by ghernandez211 -- 5/15/2008 5:28:21 PM >
Post #: 1
RE: Executing a vbscript that exits after a reaches a c... - 5/15/2008 8:24:34 PM   
mseely

 

Posts: 35
Score: 1
Joined: 5/4/2008
Status: offline
Should be able to use 'WSCRIPT.QUIT()'  if it is deeply embedded within the rest of the code.

if inGroup("For example) then
   owshshell.run \\run this script\etc\etc
   wscript.quit()
end if

-or-

if it is able to be put a the beginning of the code, can use an 'else' to run everything else if it isn't in the group.
if inGroup("For example) then
   owshshell.run \\run this script\etc\etc
   wscript.quit()
else
   'Put rest of code here
end if

(in reply to ghernandez211)
Post #: 2
RE: Executing a vbscript that exits after a reaches a c... - 6/8/2008 1:14:26 PM   
ghernandez211

 

Posts: 17
Score: 0
Joined: 5/15/2008
Status: offline
Thanks alot Mseely I appreciate your help, that did it. I created an if statement and later made it quit of the login script using this command.


(in reply to mseely)
Post #: 3
Page:   [1]
All Forums >> [Scripting Technologies] >> VB Script >> Executing a vbscript that exits after a reaches a condition 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



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.188