Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


RE: Select Case Problem

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> RE: Select Case Problem
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: <<   < prev  1 [2]
Login
Message << Older Topic   Newer Topic >>
 RE: Select Case Problem - 9/9/2007 5:54:00 PM   
  ginolard


Posts: 1053
Score: 21
Joined: 8/10/2005
Status: offline
Well, your For Next loop doesn't really do anything other than loop through the groups and assign the group name to the strGroupName variable.  Presumably you want to check that variable and map a printer based on its value

Try this instead


      

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to repa)
 
 
Post #: 21
 
 RE: Select Case Problem - 9/9/2007 6:00:35 PM   
  repa

 

Posts: 19
Score: 0
Joined: 9/4/2007
Status: offline
hi,

i testet it with your version.

but still the same. Delete Printer runs, but mapping not.

(in reply to ginolard)
 
 
Post #: 22
 
 RE: Select Case Problem - 9/9/2007 6:48:38 PM   
  ginolard


Posts: 1053
Score: 21
Joined: 8/10/2005
Status: offline
Then the Case Statement isn't being triggered.  The logic is fine.  Are you sure that the group name you want to check is "printserveR_user"?

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to repa)
 
 
Post #: 23
 
 RE: Select Case Problem - 9/9/2007 6:49:42 PM   
  repa

 

Posts: 19
Score: 0
Joined: 9/4/2007
Status: offline
yes, 100%

(in reply to ginolard)
 
 
Post #: 24
 
 RE: Select Case Problem - 9/9/2007 6:53:02 PM   
  repa

 

Posts: 19
Score: 0
Joined: 9/4/2007
Status: offline
sorry, my fault :D

was logged in with false user id ^^


IT WORKS :))))))))))))))))

now, i try the hole script :))

(in reply to ginolard)
 
 
Post #: 25
 
 RE: Select Case Problem - 9/9/2007 7:28:01 PM   
  repa

 

Posts: 19
Score: 0
Joined: 9/4/2007
Status: offline
hi

ok, works now great, but drives are not deleted. why?

Code looks like:


      

(in reply to repa)
 
 
Post #: 26
 
 RE: Select Case Problem - 9/9/2007 7:33:29 PM   
  ginolard


Posts: 1053
Score: 21
Joined: 8/10/2005
Status: offline
Jeez, there's no need to do all that...

This will delete all network drives


      

This will delete all network drives from I: onwards

      

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to repa)
 
 
Post #: 27
 
 RE: Select Case Problem - 9/9/2007 7:51:53 PM   
  repa

 

Posts: 19
Score: 0
Joined: 9/4/2007
Status: offline
hi

i only want to delete the selected Drives, this is ok.

But, the drives still there after running the script.

(in reply to ginolard)
 
 
Post #: 28
 
 RE: Select Case Problem - 9/9/2007 8:00:01 PM   
  ginolard


Posts: 1053
Score: 21
Joined: 8/10/2005
Status: offline
Remove the On Error Resume Next and see if the script is generating any errors

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to repa)
 
 
Post #: 29
 
 
Page:  <<   < prev  1 [2]
 
  

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 >> RE: Select Case Problem Page: <<   < prev  1 [2]
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