Solved

Login script to detect computer name of citrix server

Posted on 2006-06-12
4
558 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

I was recently sitting at a desk at work with one of my colleagues and needed some information on my home computer. He watched as I turned on my home computer, established a remote session into it, got the information I needed and then shut it down …
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now