Sign in with
Sign up | Sign in
Your question

File association batch file

Last response: in Applications
Share
January 12, 2010 4:48:30 AM

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
March 28, 2010 1:42:11 AM

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.
March 29, 2010 7:35:47 AM

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
!