Solved

help with batch script

Posted on 2006-06-16
1
303 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
[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
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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 …
Six Sigma Control Plans

628 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