File association batch file

nickdave

Distinguished
Jan 6, 2010
4
0
18,520
I am trying to create a .bat file that will set .ica to wfica32.exe for citrix apps.
Here is my code. When i run the following .bat file it appears to have changed, but does not actually change the program .ica opens with and still says the previous file association in the gui tool.

ECHO OFF
CLS


assoc .ica=Citrix ICA Client
ftype Citrix ICA Client=%programfiles%\Citrix\ICA Client\wfica32.exe %1



pause
 

Slohando

Distinguished
Mar 14, 2010
12
0
18,560
Open Control Panel and double click on Folder Options. Select the File Types tab and scroll down until you find the ICA file type. Click the Change button and select your program of choice. If it is not you have to search for its location with the button just below. Once you have selected it, place a check on the check box "Always use selected program......." and click on Accept and Accept again. You may have to restart your computer. Hope this helps.
 

Tom Griffin

Distinguished
Sep 29, 2009
15
0
18,560
You might try this; and Siohando, that is horrible if you have to give it to your Citrix clients. Due to the fact you would have to go to each client running the Windows terminal.

Ok, back to where I was.....

[edit] forgot double quotes in the ftype assignment

assoc.ic="Citrix ICS Client"
ftype "Citrix ICA Client"="%ProgramFiles%\Citrix\ICA Client32\wfica32.exe" %1

I believe the problem when doing this from a command prompt that it will not expand file names to proper NTFS naming conventions without using quotes with a space involved.

Hope this helps,
Tom