Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Problem with local printer declaration

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Problem with local printer declaration
  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 >>
 Problem with local printer declaration - 6/30/2008 4:43:53 AM   
  jfrsm

 

Posts: 1
Score: 0
Joined: 6/30/2008
Status: offline
Hi i'm new to vbs i have a script that is near to be completed but i have a small error and don't know where it is...

If i use the notlike condition it returns a error 80041017 non valid...Is that condition (notlike) exit in vbs? If i use (like) it worked but not as i wanted...

All i want is bypass the default printer if in the name there is adobe or fax...


      

sorry for my english, i speak french


Thanks
 
 
Post #: 1
 
 RE: Problem with local printer declaration - 6/30/2008 4:01:40 PM   
  djredmar


Posts: 61
Score: 0
Joined: 12/11/2006
From: Europe, The Netherlands
Status: offline
Maybe windows 2000 you are using?

The syntax is incorrect;

make:
("Select * From Win32_Printer Where Local = True AND Name notLike '%Adobe%' AND Name notLike '%FAX%'")
To:
("Select * From Win32_Printer Where Local = True AND Name not Like '%Adobe%' AND Name not Like '%FAX%'")

I'm guessing this is the mistake.. sometimes Microsoft uses an asterik (*) as wildcard instead of percent sign (%), don't blame me :)

(in reply to jfrsm)
 
 
Post #: 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 >> Problem with local printer declaration 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