Solved

Login script to detect computer name of citrix server

Posted on 2006-06-12
4
563 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
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.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
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…

751 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