Solved

Login script to detect computer name of citrix server

Posted on 2006-06-12
4
561 Views
Last Modified: 2008-03-10
I have a login script that I need to run on all machines in my network, except I do not want it to run on my Citrix servers when users login.  I need help with a bat file that can get the ip of the machine being logged into and if it matches a list of ip's the script will not run.

Thanks in advance,
Tom
0
Comment
Question by:tommoran
  • 2
  • 2
4 Comments
 
LVL 77

Accepted Solution

by:
Rob Williams earned 500 total points
ID: 16886752
IP of the connecting computer or computer they are connecting to?
I often use:
rem skip if run on Server
If "%COMPUTERNAME%" == "SERVER-A" GoTo END
If "%COMPUTERNAME%" == "SERVER-B" GoTo END
rem enter commands to run if not server A or B
:END
rem enter commands to always run
0
 
LVL 13

Expert Comment

by:prashsax
ID: 16886894
Ok, here is the batchscript.

----------------------------------------------------------------------------------
@echo off
cls
if %computername% ==CITRIX_SERVER1_NAME Goto end
if %computername% ==CITRIX_SERVER2_NAME Goto end

:Logit
echo %username% >> \\Server_NAME\share_name\logfile.txt
echo %computername% >> \\Server_NAME\share_name\logfile.txt


:end
----------------------------------------------------------------------------------

Now, change the CITRIX_SERVER1_NAME with the name of the citrix server.

Also, you need to share a folder with write permission for Domain Users.
Change Server_NAME and share_name with it. This is the place where all the logs are saved.



0
 
LVL 13

Expert Comment

by:prashsax
ID: 16886905
just make sure that you change the CITRIX_SERVER1_NAME as you get it using this command.

Logon to Citrix server
Open command prompt

echo %computername%

this should show you a name, use this.
0
 
LVL 77

Expert Comment

by:Rob Williams
ID: 16886952
Thanks Tom
--Rob
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to configure this in fortinet firewall 2 63
Network bottleneck identifier 13 51
How to simulate latency? 5 40
FreeRADIUS vs Windows NPS (server 2016) 2 124
Let’s list some of the technologies that enable smooth teleworking. 
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question