Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Login script to detect computer name of citrix server

Posted on 2006-06-12
4
Medium Priority
?
569 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 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
This article explains the fundamentals of industrial networking which ultimately is the backbone network which is providing communications for process devices like robots and other not so interesting stuff.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

963 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