Solved

Login script to detect computer name of citrix server

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Port forwarding 14 121
Every morning - Cannot get online - Need to reboot Dell XPS PC 5 71
DNS with WiFi Network 5 56
Recommendations for router that supports BGP over ipsec 1 61
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…
PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

863 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

25 Experts available now in Live!

Get 1:1 Help Now