Page 2 of 4 <1234>
Topic Options
#167705 - 2006-09-21 08:36 PM Re: Rename Printers
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
True, but if I open a remote desktop session to one of my servers (no citrix), I presume I get also 1?
Top
#167706 - 2006-09-21 08:48 PM Re: Rename Printers
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Hmmm... not sure but think I'll test.

Speaking for myself I think knowing if your on a TS in APPLICATION Mode is what we're all wanting, not is it a Remote Desktop or a XP Workstation we've connected to.

@TSSESSION If this macro returns 1, KiXtart is running in a Terminal Server session.

Top
#167707 - 2006-09-21 08:55 PM Re: Rename Printers
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Yep as I thought. Logged in via Remote Desktop to a Server 2000 sysstem that has Terminal Server in Administrator mode running and it tells me that I'm in a TS session.

True - I am, but I think knowing if I'm in either ADMIN mode or APPLICATION mode is of more importance to me.

Top
#167708 - 2006-09-21 09:24 PM Re: Rename Printers
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, tsSession could give 2 if in admin mode?
Top
#167709 - 2006-09-21 09:55 PM Re: Rename Printers
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well then, there's always my FAQ:
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=81649&an=0&page=0#81649

Code:

If Val(@ProductSuite) & 16
"It is a Terminal Server in 'Application' or 'Remote Administration' mode" ?
EndIf


Top
#167710 - 2006-09-21 09:58 PM Re: Rename Printers
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
eh?
but les... what if you want to differentiate between them?

Top
#167711 - 2006-09-21 10:00 PM Re: Rename Printers
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Then RTFF!
Top
#167712 - 2006-09-21 10:07 PM Re: Rename Printers
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
I know how to do it, but saying that current version of
@TSSESSION

Could be easily improved.

Top
#167713 - 2006-09-21 10:07 PM Re: Rename Printers
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
indeed.
rtfm to me as well.

Top
#167714 - 2006-09-21 10:12 PM Re: Rename Printers
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
In this world of Instant Oatmeal, everybody wants instant answers. Well... the answer is in the FAQ compliments of Howard!
Top
#167715 - 2006-09-21 10:16 PM Re: Rename Printers
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

indeed.
rtfm to me as well.



What, like a bedtime story?
How about a lullaby instead?
http://www.babycenter.com/general/baby/babysleep/6733.html
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#167716 - 2006-09-21 11:22 PM Re: Rename Printers
Witto Offline
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
#167717 - 2006-09-21 11:51 PM Re: Rename Printers
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
real alternative?

or was it realplayer alternative


no, that wasn't a question, but the name of the software.

like, what's the job title of the dude who fights fire.

Top
#167718 - 2006-09-22 12:51 AM Re: Rename Printers
therob Offline
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 Offline
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 Offline
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 Offline
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 Offline
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
#167723 - 2006-09-26 04:20 AM Re: Rename Printers
therob Offline
Starting to like KiXtart

Registered: 2005-05-19
Posts: 150
Loc: Frankfurt/M., Germany
Quote:

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





Nah, you didn't try to *register* the dll, you tried to *unregister* it. But because its not *registered* yet, you cant... thats the errormessage. Leave the "/u" out of the commandline and it registers fine.
_________________________
Eternity is a long time, especially towards the end. - W.Allan

Top
#167724 - 2006-09-26 06:42 AM Re: Rename Printers
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
I don't think so. IMHO, when unregistering, it should say it is successfully unregistered. Even when it was not registered.
Top
Page 2 of 4 <1234>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1574 anonymous users online.
Newest Members
BeeEm, min_seow, Audio, Hoschi, Comet
17882 Registered Users

Generated in 0.211 seconds in which 0.105 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org