Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return username instead of computer name in Metaframe 1.8

Status
Not open for further replies.
Jun 27, 2001
837
US
We have a published application which the vendor requires that an ini file be the computer's name. With Citrix I need to change this to the user name. We are on an NT Domain, the Metaframe 1.8 server is on Win 2000. I found an article for Winframe 1.8 which mentions a Registry entry to have Citrix change this but it doesn't seem to work with Metaframe 1.8. ANyone have a solution to this or run into this problem. Help! in a hurry?
Thanks
 
Hi
Just some ideas :
I normally write a batch file to run a publish application. If it's the server's name you want as the published application runs from the server, refer to it in the batch file as %COMPUTERNAME%.
If it's the client's computer's name you want (hope not) this could be a bit of a problem. you can get the client's name (which by default, when the Citrix client is installed, the client's name is the client's computer's name) by refer to it as %CLIENTNAME% . If the user changed the computer's name after the Citrix client was installed, the Citrix client's name will be different from the computer's name.
The Citrix client's name is in (client's)C:\WFCNAME.ini, edit that to change the Citrix's client name.
Hope this gives you some ideas
Ta
 
The actual ini file for the application is in the directory where the application resides on the CItrix server (d:\dental) If we can get the client computer name or the client NT login Name either might work
 
Do I understand this correctly..The application runs on the citrix server but the ini file needs the client's name? If you still can't suss it, can you email me the ini file (or part of it) so I have a bit more idea. Are you familiar with regedit? I sometime wrote batch scripts to change the registry when users log on, if you know exactly where the username needs to be in the registry.
 
I will plead rookie status on Citrix, I am a DBA doing that job until position is filled. The ini file resides on the Citrix server in the folder with the application. In a fat client the ini file needs to be the computer name. Of course in Citrix the computer is the server name, and when the second user logs in they can't get to it. We tried the idea of putting the ini file named after each PC that attaches to Citrix but did not work. Trying to work with vendor(who has no Citrix experience) into changing call from using computer name to user name(they are working on that). Below is waht the ini file looks like. The install for this is simple, add ODBC data source, and copy file to the hard drive. Would be interested in seeing you batch file to load published app and how you do it.

3:22 PM 5/31/00;===================================================
;
; Below is for integrated Chairside components
;
;===================================================

[]
Practice=1
ClientKey=0x00000064
Prod1=0x000c3fc0
Prod2=0x001604dc
Prod3=0x000ee580
Prod4=0x000d9bc4
Prod5=0x000cc228
Prod8=0x00028144
OtherApp=
Practice=0x00000001

[haha]
Practice=1
ClientKey=0x00000064
Prod1=0x000c3fc0
Prod2=0x001604dc
Prod3=0x000ee580
Prod4=0x000d9bc4
Prod5=0x000cc228
Prod8=0x00028144
OtherApp=
Practice=0x00000001

[Chart]
ShowWhat=DPWAR
History=NVIQDCPWARZM

[Database]
Integrated=0x00000000
MultiUser=0x00000001
ConnectString=DSN=dental;UID=nextgen;PWD=clinitec

[Font]
Height=0x00000008
Weight=0x000001f4
FaceName=MS Sans Serif

[Integrity]
pid=0

[Patient Education]
;note: duplicate key name in NextGen.ini
Name=Caesey
Path=C:\\CAESY\\MENU.EXE D:\
[Perio]
AlertDepth=3
Process=4
AutoAdvance=31
AutoAdvanceBits=13

[Perio\Color]
Suppuration=65535
Blood=255
Both=128
AlertDepth=16711680
GingivalMargin=16711680
MGJ=16711680

[Printers\Chart]
DriverName=winspool
DeviceName=HP LaserJet 5M
Output=LPT1:
DevmodeLength=716

[Printers\Images]
DriverName=WINSPOOL
DeviceName=HP LaserJet 4000 Series PCL 6
Output=\\DMS2\Lab4000
DevmodeLength=370

[Printers\Reports]
DriverName=winspool
DeviceName=\\printers\LJ114
Output=IP_161.195.20.5
DevmodeLength=1108

[SetVideo]
Brightness=0x0000007d
Contrast=0x0000007d
Saturation=0x0000007d
Tint=0x0000007d

[Video]
ImageQuality=0x0000006e
MaxUndo=0x00000006
QualityFactor=7
Open=open %s alias OPVIDEO style child parent %d
Put=put OPVIDEO window at %d %d %d %d
Save=capture OPVIDEO as %s

[Video\Matrox]
SetSource=setvideo OPVIDEO number 3

[Video\Matrox\SetVideo]
SetBrightness=setvideo OPVIDEO brightness to %d
SetContrast=setvideo OPVIDEO contrast to %d
SetSaturation=setvideo OPVIDEO color to %d
SetTint=setvideo OPVIDEO tint to %d
ScrollRange=0x000003e8

[Video\Video Logic]
SetSource=setvideo OPVIDEO source to svideo
Put=put OPVIDEO window client at %d %d %d %d

[Video\Video Logic\SetVideo]
SetBrightness=setvideo OPVIDEO brightness to %d
SetContrast=setvideo OPVIDEO contrast to %d
SetSaturation=setvideo OPVIDEO saturation to %d
SetTint=setvideo OPVIDEO tint to %d
ScrollRange=0x000003e8
VideoSignal=0x00000000
VideoSource=0x00000000

[Voice]
Threshold=80
Threshold2=60
UseVoice=0
StartInMode=1
Last_HWND=704
BubbleLife=2000
TrainID=1

[XRay]
Type=CDR

[XRay\CDR]
Path=c:\cdr\obj\ncdr.exe
ArchiveDirectory=C:\CDR\XRAYS\ARCHIVES
LocalDirectory=C:\CDR\XRAYS\QSI1
ImageDirectory=
QSIXray=1

[SetVideo]
Brightness=90
Contrast=82
Saturation=67
Tint=61

[\SetVideo]
Brightness=125
Contrast=125
Saturation=125
Tint=125

;===================================================
;
; Above is for integrated Chairside components
;
;===================================================

[ToolBars-Summary]
Bars=7
ScreenCX=800
ScreenCY=600
[Default]
Practice=1













[ToolBars-Bar0]
BarID=59393
Visible=0
[ToolBars-Bar1]
BarID=59419
Bars=4
Bar#0=0
Bar#1=3000
Bar#2=2999
Bar#3=0
[ToolBars-Bar2]
BarID=59422
Bars=3
Bar#0=0
Bar#1=68535
Bar#2=0
[ToolBars-Bar3]
BarID=59420
Bars=3
Bar#0=0
Bar#1=68535
Bar#2=0
[ToolBars-Bar4]
BarID=59421
Bars=5
Bar#0=0
Bar#1=0
Bar#2=0
Bar#3=68535
Bar#4=0
[ToolBars-Bar5]
BarID=2999
XPos=478
YPos=-2
Docking=1
MRUDockID=59419
MRUDockLeftPos=478
MRUDockTopPos=-2
MRUDockRightPos=782
MRUDockBottomPos=48
MRUFloatStyle=8192
MRUFloatXPos=308
MRUFloatYPos=429
[ToolBars-Bar6]
BarID=3000
XPos=20
YPos=-2
Docking=1
MRUDockID=59419
MRUDockLeftPos=20
MRUDockTopPos=-2
MRUDockRightPos=480
MRUDockBottomPos=48
MRUFloatStyle=8192
MRUFloatXPos=-29
MRUFloatYPos=448
 
When you said >> In a fat client the ini file needs to be the computer name. did you mean the name of the ini file should be the computer's name ?? If it's that here is what I would try ..
1. rename the file to something else I'll call it ComName.ini, say.
2. write a batch file called , say, RunApp.bat and the content will be>>>

@echo off
change client /default
REM the above line is citrix command to make sure that the drives mapped properly
cmd /c copy (path to the ini file)\ComName.ini (path to the ini file)\%COMPUTERNAME%.ini
command-to-run-your-app.exe
REM end of batch file

That should do the trick if you just want the name of the ini file to be the name of the computer.

By having a look at the content of the file, this is what I guessed you might need to change thenname in the section below as well : (Ignore this if it is not relevant)

[Patient Education]
;note: duplicate key name in NextGen.ini
Name=Caesey
Path=C:\\CAESY\\MENU.EXE D:\
Try this
1. If it doesn't make any different where this section [Patient Education] is in the ini file, I 'd move it to the end. and re move this bit :
Name=Caesey
Path=C:\\CAESY\\MENU.EXE D:\(still rename it to ComName.ini )

2. edit the batch file
@echo off
change client /default
REM >>the above line is citrix command to make sure that the drives mapped properly
cmd /c copy (path to the ini file)\ComName.ini (path to the ini file)\%COMPUTERNAME%.ini
REM >> this bit is to add the bit that you removed but with the new computer name (and the new path if needed)
echo
echo Name=%COMPUTERNAME% >> (path to the ini file)%COMPUTERNAME%.ini
echo
REM Change Path if you need to
echo Path=C:\\CAESY\\MENU.EXE D:\\ >> (path to the ini file)%COMPUTERNAME%.ini
command-to-run-your-app.exe
REM end of batch file

So you got the batch file to change to the computer's name called RunApp.bat
In the command line to run the published application you just call this batch file instead.

See if it works, if not I'll talk you through checking the reg key and change that.
Good luck
Ta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top