Solved

help with batch script

Posted on 2006-06-16
1
297 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
Comment Utility
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

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This is about my first experience with programming Arduino.
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 …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

762 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

11 Experts available now in Live!

Get 1:1 Help Now