Jump to content
Sign in to follow this  
ZipleR

_Net_Share_ShareCheck Case Sensitive?

Recommended Posts

ZipleR

I am having a hard time checking the existence of Printer shares.

It seems to me that the Printer name in _Net_Share_ShareCheck(Server,Printer) is case sensitive.

Can anyone think of a workaround for this? I was having Problems on 3.3.6.1 and just upgraded to 3.3.8.1 because it mentioned a fix to this UDF.

Here is a simple script so someone else can test this and see what I am talking about.

#Include <NetShare.au3>
#Include <Array.au3>

Dim $keepLooping = 1, $Input1 = "", $Input2 = ""
 
While $keepLooping = 1
     $Input1 = InputBox("Server","Enter Server Name",$Input1)
     If @error then ExitLoop
    
    $Input2 = InputBox("Printer","Enter Printer Name",$Input2)
    If @error then ExitLoop

    $Result = _Net_Share_ShareCheck($Input1, $Input2)

    If $Result = $STYPE_PRINTQ then
        MsgBox(0,"Info", "It is a print queue")
    Else
        MsgBox(0,"Booo", "It is not a print queue")
    EndIf
WEnd

Exit
------ Edited by ZipleR

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×