#147653 - 2005-09-13 05:53 PM
Re: Disable Beep??
|
bippyfeb2098
Fresh Scripter
Registered: 2005-09-12
Posts: 39
|
I thank you very much for the assistance and the in side scoop on how to post code. I will be sure to comply going forward.
Again, I really appreciate your assistance.
|
Top
|
|
|
|
#147654 - 2005-09-13 06:49 PM
Re: Disable Beep??
|
bippyfeb2098
Fresh Scripter
Registered: 2005-09-12
Posts: 39
|
I seem to be getting a "failed to find/open script" upon login. The script is located in the Netlogon share along with the Kix32.exe.
|
Top
|
|
|
|
#147656 - 2005-09-13 09:11 PM
Re: Disable Beep??
|
bippyfeb2098
Fresh Scripter
Registered: 2005-09-12
Posts: 39
|
I am unable to get the to work. I fixed the permissions issue and the script will run but no printers are created. It just flies right on by. Have I done something wrong with the script?
Code:
if ingroup("18EastPrint") If ADDPRINTERCONNECTION ("\\print01\18_East") = 0 ? "Added printer connection...." endif If ADDPRINTERCONNECTION ("\\print01\18E_Copier") = 0 ? "Added printer connection...." endif If SetDefaultPrinter ("\\print01\18_East") = 0 ? "Set default printer to 18_East...." endif endif
if ingroup ("18NortheastPrint") If ADDPRINTERCONNECTION ("\\print01\18_Northeast") = 0 ? "Added printer connection...."
If ADDPRINTERCONNECTION ("\\print01\18E_Copier") = 0 ? "Added printer connection...."
If SetDefaultPrinter ("\\print01\18_Northeast") = 0 ? "Set default printer to 18_Northeast...."
Endif
Endif
if ingroup ("18SoutheastPrint") If ADDPRINTERCONNECTION ("\\print01\18_Southeast") = 0 ? "Added printer connection...."
If ADDPRINTERCONNECTION ("\\print01\18E_Copier") = 0 ? "Added printer connection...."
If SetDefaultPrinter ("\\print01\18_Southeast") = 0 ? "Set default printer to 18_Southeast...."
Endif
Endif
if ingroup ("18SouthwestPrint") If ADDPRINTERCONNECTION ("\\print01\18_Southwest") = 0 ? "Added printer connection...."
If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...."
If SetDefaultPrinter ("\\print01\18_Southwest") = 0 ? "Set default printer to 18_Southwest...."
Endif
Endif
if ingroup ("18WestPrint") If ADDPRINTERCONNECTION ("\\print01\18_West") = 0 ? "Added printer connection...."
If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...."
If SetDefaultPrinter ("\\print01\18_West") = 0 ? "Set default printer to 18_West...."
Endif
Endif
if ingroup ("Immigration4100Print") If ADDPRINTERCONNECTION ("\\print01\Immigration4100") = 0 ? "Added printer connection...."
If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...."
If SetDefaultPrinter ("\\print01\Immigration4100") = 0 ? "Set default printer to Immigration4200...."
Endif
Endif
if ingroup ("Immigration4200Print") If ADDPRINTERCONNECTION ("\\print01\Immigration4200") = 0 ? "Added printer connection...."
If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...."
If SetDefaultPrinter ("\\print01\Immigration4200") = 0 ? "Set default printer to Immigration4200...."
Endif
Endif
if ingroup ("RecordsPrint") If ADDPRINTERCONNECTION ("\\print01\Records4000") = 0 ? "Added printer connection...."
If ADDPRINTERCONNECTION ("\\print01\18E_Copier") = 0 ? "Added printer connection...."
If SetDefaultPrinter ("\\print01\Records4000") = 0 ? "Set default printer to 18_Records4000...."
Endif
Endif
if ingroup ("SASPrint") If ADDPRINTERCONNECTION ("\\print01\SAS4100") = 0 ? "Added printer connection...."
If ADDPRINTERCONNECTION ("\\print01\18E_Copier") = 0 ? "Added printer connection...."
If SetDefaultPrinter ("\\print01\SAS4100") = 0 ? "Set default printer to SAS4100...."
Endif
Endif
if ingroup ("GSPrint") If ADDPRINTERCONNECTION ("\\print01\GSCopier") = 0 ? "Added printer connection...."
If SetDefaultPrinter ("\\print01\GSCopier") = 0 ? "Set default printer to GSCopier...."
Endif
Endif
if ingroup ("HRPrint") If ADDPRINTERCONNECTION ("\\print01\HumanResources") = 0 ? "Added printer connection...."
If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...."
If SetDefaultPrinter ("\\print01\HumanResources") = 0 ? "Set default printer to HumanResources...."
Endif
Endif
if ingroup ("TrustPrint") If ADDPRINTERCONNECTION ("\\print01\18West_Trust") = 0 ? "Added printer connection...."
If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...."
If SetDefaultPrinter ("\\print01\18West_Trust") = 0 ? "Set default printer to 18West_Trust...."
Endif
Endif
Edited by bippyfeb2098 (2005-09-13 09:14 PM)
|
Top
|
|
|
|
#147659 - 2005-09-13 10:55 PM
Re: Disable Beep??
|
Chris S.
MM club member
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Here is what it looks like with the proper amount of EndIf's and indented code...
Code:
if ingroup("18EastPrint") If ADDPRINTERCONNECTION ("\\print01\18_East") = 0 ? "Added printer connection...." endif If ADDPRINTERCONNECTION ("\\print01\18E_Copier") = 0 ? "Added printer connection...." endif If SetDefaultPrinter ("\\print01\18_East") = 0 ? "Set default printer to 18_East...." endif endif if ingroup ("18NortheastPrint") If ADDPRINTERCONNECTION ("\\print01\18_Northeast") = 0 ? "Added printer connection...." EndIf If ADDPRINTERCONNECTION ("\\print01\18E_Copier") = 0 ? "Added printer connection...." EndIf If SetDefaultPrinter ("\\print01\18_Northeast") = 0 ? "Set default printer to 18_Northeast...." Endif Endif if ingroup ("18SoutheastPrint") If ADDPRINTERCONNECTION ("\\print01\18_Southeast") = 0 ? "Added printer connection...." EndIf If ADDPRINTERCONNECTION ("\\print01\18E_Copier") = 0 ? "Added printer connection...." EndIf If SetDefaultPrinter ("\\print01\18_Southeast") = 0 ? "Set default printer to 18_Southeast...." Endif Endif if ingroup ("18SouthwestPrint") If ADDPRINTERCONNECTION ("\\print01\18_Southwest") = 0 ? "Added printer connection...." EndIf If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...." EndIf If SetDefaultPrinter ("\\print01\18_Southwest") = 0 ? "Set default printer to 18_Southwest...." Endif Endif if ingroup ("18WestPrint") If ADDPRINTERCONNECTION ("\\print01\18_West") = 0 ? "Added printer connection...." EndIf If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...." EndIf If SetDefaultPrinter ("\\print01\18_West") = 0 ? "Set default printer to 18_West...." Endif Endif if ingroup ("Immigration4100Print") If ADDPRINTERCONNECTION ("\\print01\Immigration4100") = 0 ? "Added printer connection...." EndIF If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...." EndIf If SetDefaultPrinter ("\\print01\Immigration4100") = 0 ? "Set default printer to Immigration4200...." Endif Endif if ingroup ("Immigration4200Print") If ADDPRINTERCONNECTION ("\\print01\Immigration4200") = 0 ? "Added printer connection...." EndIf If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...." EndIf If SetDefaultPrinter ("\\print01\Immigration4200") = 0 ? "Set default printer to Immigration4200...." Endif Endif if ingroup ("RecordsPrint") If ADDPRINTERCONNECTION ("\\print01\Records4000") = 0 ? "Added printer connection...." EndIf If ADDPRINTERCONNECTION ("\\print01\18E_Copier") = 0 ? "Added printer connection...." EndIf If SetDefaultPrinter ("\\print01\Records4000") = 0 ? "Set default printer to 18_Records4000...." Endif Endif if ingroup ("SASPrint") If ADDPRINTERCONNECTION ("\\print01\SAS4100") = 0 ? "Added printer connection...." EndIf If ADDPRINTERCONNECTION ("\\print01\18E_Copier") = 0 ? "Added printer connection...." EndIf If SetDefaultPrinter ("\\print01\SAS4100") = 0 ? "Set default printer to SAS4100...." Endif Endif if ingroup ("GSPrint") If ADDPRINTERCONNECTION ("\\print01\GSCopier") = 0 ? "Added printer connection...." EndIf If SetDefaultPrinter ("\\print01\GSCopier") = 0 ? "Set default printer to GSCopier...." Endif Endif if ingroup ("HRPrint") If ADDPRINTERCONNECTION ("\\print01\HumanResources") = 0 ? "Added printer connection...." EndIf If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...." EndIf If SetDefaultPrinter ("\\print01\HumanResources") = 0 ? "Set default printer to HumanResources...." Endif Endif if ingroup ("TrustPrint") If ADDPRINTERCONNECTION ("\\print01\18West_Trust") = 0 ? "Added printer connection...." EndIf If ADDPRINTERCONNECTION ("\\print01\18W_Copier") = 0 ? "Added printer connection...." EndIf If SetDefaultPrinter ("\\print01\18West_Trust") = 0 ? "Set default printer to 18West_Trust...." Endif Endif
|
Top
|
|
|
|
#147660 - 2005-09-14 07:09 PM
Re: Disable Beep??
|
bippyfeb2098
Fresh Scripter
Registered: 2005-09-12
Posts: 39
|
Thank so much. All of you. It worked great. The only issue I am having now is that I would like to remove the "old" connections to the soon to be defunct printserver. Is there a way using the Code:
delprinterconnection command that will delete all connections to printserver rather than printer?
Thank you again.
Edited by bippyfeb2098 (2005-09-14 07:19 PM)
|
Top
|
|
|
|
#147663 - 2005-09-14 07:21 PM
Re: Disable Beep??
|
bippyfeb2098
Fresh Scripter
Registered: 2005-09-12
Posts: 39
|
you da man, Jooel.
|
Top
|
|
|
|
#147664 - 2005-09-14 07:28 PM
Re: Disable Beep??
|
bippyfeb2098
Fresh Scripter
Registered: 2005-09-12
Posts: 39
|
Seems to work sometimes and not others.
|
Top
|
|
|
|
#147665 - 2005-09-14 10:14 PM
Re: Disable Beep??
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
Stop the beep (though late and you seem to be fixing the code now)
Code:
Break On Dim $NB $NB=WriteValue('HKCU\Control Panel\Sound','Beep','No',REG_SZ)
|
Top
|
|
|
|
#147666 - 2006-02-14 11:13 PM
Re: Disable Beep??
|
bippyfeb2098
Fresh Scripter
Registered: 2005-09-12
Posts: 39
|
Quote:
you can simply do: delprinterconnection('')
before you start mapping new ones. if that does not work, you can always get the delPrinterConnectionS() udf from udf library. and if you only want to del the connections to one server, well, just modify the code of that udf.
You mention that I could delete all printer connections that are hosted on a certain server...how would I do so?
|
Top
|
|
|
|
#147667 - 2006-02-17 06:25 PM
Re: Disable Beep??
|
Arend_
MM club member
Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
|
|
Top
|
|
|
|
#147668 - 2006-02-21 05:34 PM
Re: Disable Beep??
|
bippyfeb2098
Fresh Scripter
Registered: 2005-09-12
Posts: 39
|
Thank you, I have been redirected to this link a few times, yet I still do not know how to incorporate it into deleting print connections from one particular server.
|
Top
|
|
|
|
#147670 - 2006-02-21 08:59 PM
Re: Disable Beep??
|
bippyfeb2098
Fresh Scripter
Registered: 2005-09-12
Posts: 39
|
Thanks for the philosophical enlightenment, Les
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 128 anonymous users online.
|
|
|