Solved

help with batch script

Posted on 2006-06-16
1
298 Views
Last Modified: 2010-10-05
The following script is required for users accessing Citrix Terminal Server application. The application has issues with its tty port mapping, so I need to create a batch that copies its ini . My problem with the sccript is when I use the Citrix ICA client from any computername (like bks111) It creates the dev directory but creates the %computername% of the name citrix01 (which happens to be the name of the Citrix sytem). Since It creats the the subfolder name in the dev directory Citrix01 the following xcopy \\bks-gps001\dev$\%computername%\HBOWEM32.ini \\bks-gps001\TermServerProfile$\%username%\Windows /i /Y  also isn't copied over .  





IF %COMPUTERNAME%.==bks-dc001. GOTO end
@ echo off
REM Check for HBOWEM32.ini
if not exist \\bks-gps001\dev$\%computername% mkdir \\bks-gps001\dev$\%computername%
if not exist \\bks-gps001\dev$\%computername%\HBOWEM32.ini xcopy c:\Windows\HBOWEM32.ini \\bks-gps001\dev$\%computername% /i
xcopy \\bks-gps001\dev$\%computername%\HBOWEM32.ini \\bks-gps001\TermServerProfile$\%username%\Windows /i /Y

:end
0
Comment
Question by:cogit
1 Comment
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 16927060
I'm not sure I understand exactly what the desired result is.  If you want to use the computername of each client machine instead of Citrix01, substitute the variable %clientname% for %computername%.
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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
A short article about problems I had with the new location API and permissions in Marshmallow
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

929 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

8 Experts available now in Live!

Get 1:1 Help Now