Access remote workstations by calling their domain names through the command line
PCAnywhere could be configured easily for accessing large number of Remoted Desktops. The “keys” to the access of each workstations are stored in configuration *.CHF types of files stored by default in the C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Remote” folder. Once the files are named with the domain names the a configuration setting improvement could speed the access to each station, so that each domain name of an workstation would become an command (those are accessed at least 100 times per day in regular administration work). The idea is to create batch files for the starting of each workstation, by referring to its *.CHF file. The PCAnywhere support pages provide the following call:
"C:\Program Files\Symantec\pcAnywhere\Winaw32.exe" [params] [pathToCHFfile]
So for each workstation the following call could be stored in a batch file:
cmd /c start /max "C:\Program Files\Symantec\pcAnywhere\Winaw32.exe" "C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Remotes\Workstations
DomainName.CHF"
and the name of the file could be saved as the Domain Name of the workstation. Of course if the naming convention is standard and there are more than 4 stations to be accessed so the writing of those batch files could be automated.
Here is the batch file for writing:
:: CREATES CMD FILES FOR STARTING CHF FILES
:: THIS ROW STARTS SOME CHF FILE BY ACCOSSIOATING IT WITH PCANYWHERE EXECUTABLE
:: cmd /c start /max "C:\Program Files\Symantec\pcAnywhere\Winaw32.exe" "C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Remotes\1USD01070.CHF"
:: SETTINGS
set CHFDir=C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Remotes
set RunDir=C:\temp\UTILS
:: FOR EACH CHF IN THE CHF DIRECTORY PUT THE COMMAND INTO SEPARATE FILE
for /f "tokens=1 delims=." %%i in ('dir "%CHFDir%\*.chf" /b') do (
echo start /max "C:\Program Files\Symantec\pcAnywhere\Winaw32.exe" "C:\Documents and Settings\All Users\Application Data\Symantec\pcAnywhere\Remotes\%%i.CHF" > "%RunDir%\%%i.cmd"
)
Getting the Current TabItem when the Tab is not selected in WPF
-
[image: Banner]
This is a quick reminder to self on how to retrieve a TabItem from a WPF
TabControl *when the tab is not currently selected* because I ru...
1 month ago