#167716 - 2006-09-21 11:22 PM
Re: Rename Printers
|
Witto
MM club member
   
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
That leaves me with two questions
- With @ProductSuite you can verify if a Terminal Server is used in Enterprise (Application) mode. But if you have a Citrix server, is it wrong to verify if %clientname% exists?
- I do not like the realplayer. Can anyone suggest a good alternative?
|
Top
|
|
|
|
#167718 - 2006-09-22 12:51 AM
Re: Rename Printers
|
therob
Starting to like KiXtart
Registered: 2005-05-19
Posts: 150
Loc: Frankfurt/M., Germany
|
The more i think of it the more i'm sure the logonscript is not the best place for the code. If you have checked the citrix-option "dont wait for printer", which is best practice, citrix is usally still in the process of printer mapping when the logonscript runs. So the code would fail. I would only uncheck that option if the users are not able to freely map printers to their local pc. If they do, theres always a good chance they have old, deceased printers or printers attached to another pc mapped, which may be offline. If so, the application start can take minutes before the printer mapping is finished, because citrix tries to map every dead printer x-times before skip to the next. The users usally dont accept that kind of delay. Mhm, ok, they might, if thats their only chance to print at all. 
Anyway, afaik there are just a few apps that have problems with the long printernames, so i would place the script -as described before- in the application publishing. There is a chance citrix is still not finished with the mapping when the script starts, but its the latest possibility to start a script in a session. And, if you do it that way, its also not neccessary to check if its a TS-session. 
Btw.: citrix solved that problem with long printernames with Presentation Server 4, finally.
@witto
Quote:
But if you have a Citrix server, is it wrong to verify if %clientname% exists?
No, its not. It usually works fine.
EDIT: @ Nazeedah: if you really cant get the code to work, i just stumbled over this: a (free) Utility to Rename an Auto-Created Client Printer’s Name
Edited by therob (2006-09-22 01:18 AM)
|
Top
|
|
|
|
#167719 - 2006-09-24 05:46 PM
Re: Rename Printers
|
Nazeedah
Fresh Scripter
Registered: 2006-09-15
Posts: 20
|
Hello Thank you all for all your reply it do help.Therob can you please tell me what for the kix code that you run and work fine. how you did and what is does exactly, please...
Therob , i do download the code for the link that you give last time. what i have uderstand is that i will have to execute the renameprinters.exe only by follwing the steps below:
Method 1:Call from the Appsetup Key without progress bar -------------------------------------------------------- 1.Create a directory in the c:\winnt\system32 directory call "PrinterSol" 2.Copy All of the files in this package to that location 3.Register the prnadmin.dll 4.Create a batch file called ctxprinters.bat and place it in the C:\winnt\system32 directory. The directory path does not really matter, as long as the application is in the PATH. The batch file should have the following syntax:
@echo off REM WAIT.EXE (AMOUNT OF TIME TO PAUSE FOR PRINTERS TO CREATE) echo Renaming Client Printers. Please wait! WAIT 20 REM This will wait 20 Seconds renameprinters.exe %username%- REM This will rename the printers and append the prefix username-printername
5.Create an entry in the registry following any other settings in the APPSETUP Key "HKLM\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENT\VERSION\WINLOGON\". An example of the entries in this key is (UsrLogon.Cmd,updatdrv.exe,cmstart.exe,ctxprinters.bat)
But i am not able to do the last step. the step 5.I have not seen the examples mention above when i go to the specified path and i do not know how to create an ntry and which entry should i create?? does it mean i should create an entry for ctxprinters.bat?? Please help me out. i have not been able to test the program till now?
Thanks a lot in advance
Nazeedah
|
Top
|
|
|
|
#167720 - 2006-09-24 10:28 PM
Re: Rename Printers
|
Witto
MM club member
   
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
I do not totally get your question. So forgive me for asking. Have you ever used the registry editor? Just open a command prompt and type: Code:
regedit
There is a typo in the path: "CURRENT\VERSION" must be "CurrentVersion". HKLM = HKEY_LOCAL_MACHINE. Code:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
I checked on my computer, The AppSetup key exists. On my computer it is empty. You will have to check it on the computer you are implementing this tool on. If something is written in the value of the key, just ad a comma at the end. Add the name of the batch file, as in the example.
I hope this is the answer you are looking for?
|
Top
|
|
|
|
#167721 - 2006-09-25 07:45 AM
Re: Rename Printers
|
Nazeedah
Fresh Scripter
Registered: 2006-09-15
Posts: 20
|
Hello, I have done all the steps but i have got an error when i register the prnadmin.dll. the error is: DLLUnregister server in c:\winnt\system32 failed Return code 0*8002801c
Could you please help??
still when i try to execute the PrinterRename.exe i got an error stating that :Please enter a printer prefix parameter.The Application will not terminate.
Thanks a lot Nazeedah
|
Top
|
|
|
|
#167722 - 2006-09-25 09:04 AM
Re: Rename Printers
|
Witto
MM club member
   
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
IMHO, your needs are going beyond the help I can give you via a free public forum (I will not speak for someone else).
- Do you have enough admin rights on the system where you try to register the DLL?
- Have you tried to register this DLL on other computers where you have enough admin rights? Do you see any differences? If yes, which?
- If you would read and understand the batch file you are creating, you would see that PrinterRename.exe needs an argument.
Again, if you do have problems of this kind and you want to discuss them here, I think you should discuss them in "General Discussions"
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1574 anonymous users online.
|
|
|