File association batch file

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
2 answers Last reply
More about file association batch file
  1. 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.
  2. 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
Ask a new question

Read More

Programming Citrix Apps File Association