Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

help with batch script

Posted on 2006-06-16
1
Medium Priority
?
304 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 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Progress

722 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