Citrix 10.1 client information
I need to add a different ini file to the install of the citrix 10.1 client. How would I go about doing this?
I am using Wise Package Studio 7.
I need to have it setup to replace existing ini files as it will serve as updating an older version of citrix, as well as being a new install for people who do not have citrix already installed and need the ini files for the first time.
Appsrv.ini is the main one along with a few others.
I am using Wise Package Studio 7.
I need to have it setup to replace existing ini files as it will serve as updating an older version of citrix, as well as being a new install for people who do not have citrix already installed and need the ini files for the first time.
Appsrv.ini is the main one along with a few others.
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
legends92
16 years ago
Posted by:
anonymous_9363
16 years ago
Posted by:
AngelD
16 years ago
Posted by:
reds4eva
16 years ago
The problem is that Citrix copies the ini files to the user profile, and it uses that ini file, not the one in progfiles. So you have to install Citrix client, and replace the ini files in program files and any user profiles.
do a msiexec /a icapkg32.msi
If you want to change the ini files, then you need to choose "uncompressed", that extracts all of the source and you can put in your own ini files later.
Choose all of the options you want, ie. yes to license etc.
It will create a msi, plus the program files folder (your ini files go in there).
I then used a custom action that runs a VB script to remove any instances of pn.ini file in any user profiles. (When the citrix client is started it copies the pn.ini file to the users profile.)
Script to remove pn.ini -
You can change the constants to whatever you want to remove. ProtectedUsers are profiles that the files do not get removed from.
Const FileToDelete = "PN.ini"
Const AllUsers = "\All Users"
Const DeleteProtectedUsers = "TRUE"
Const TemplatesFolder = "Application Data\ICAClient"
Const ProtectedUsers = "Default User,Administrator,All Users,NetworkService,LocalService"
Dim oFSO, oWSH
Dim sAllUsersProfile, oAllUsersFolder, sProfilesRoot, oFolder
Dim colFSOSubFolders
Dim protuserarray
Dim DeleteFlag
On Error Resume Next ' this is set because the designated file may be locked from deletion
protuserarray = Split(ProtectedUsers,",")
' Instantiate the objects
Set oFSO = CreateObject("Scripting.FileSystemObject")
set oWSH = CreateObject("WScript.Shell")
' Get the Allusers profile folder path first and from this determine profiles parent folder
'
sAllUsersProfile = oWSH.ExpandEnvironmentStrings("%ALLUSERSPROFILE%")
Set oAllUsersFolder = oFSO.GetFolder(sAllUsersProfile)
sProfilesRoot = oAllUsersFOlder.ParentFolder
' Now enumerate all existing user profile folders
Set oFolder = oFSO.GetFolder(sProfilesRoot)
Set colFSOSubfolders = oFolder.Subfolders
' Now go through each existing user profile folder looking for the designated file to delete
For Each objSubfolder in colFSOSubfolders
DeleteFlag = "TRUE"
if oFSO.FileExists(sProfilesRoot & "\" & objSubfolder.Name & "\" & TemplatesFolder & "\" & FileToDelete) then
' Found the file, now establish whether containing folder is on the exempt list
if NOT DeleteProtectedUsers then
For Each element in protuserarray
if ucase(element) = ucase(objSubfolder.Name) then
DeleteFlag = "FALSE" ' mark this occurrence of the designated file as exempt from deletion
exit for
end if
Next
end if
If DeleteFlag then
' File was found in a folder that is not exempt, so go ahead and attempt to delete
oFSO.DeleteFile sProfilesRoot & "\" & objSubfolder.Name & "\" & TemplatesFolder & "\" & FileToDelete,TRUE
end if
end if
Next
' Clean up before exiting
set oFSO = Nothing
set oWSH = Nothing
do a msiexec /a icapkg32.msi
If you want to change the ini files, then you need to choose "uncompressed", that extracts all of the source and you can put in your own ini files later.
Choose all of the options you want, ie. yes to license etc.
It will create a msi, plus the program files folder (your ini files go in there).
I then used a custom action that runs a VB script to remove any instances of pn.ini file in any user profiles. (When the citrix client is started it copies the pn.ini file to the users profile.)
Script to remove pn.ini -
You can change the constants to whatever you want to remove. ProtectedUsers are profiles that the files do not get removed from.
Const FileToDelete = "PN.ini"
Const AllUsers = "\All Users"
Const DeleteProtectedUsers = "TRUE"
Const TemplatesFolder = "Application Data\ICAClient"
Const ProtectedUsers = "Default User,Administrator,All Users,NetworkService,LocalService"
Dim oFSO, oWSH
Dim sAllUsersProfile, oAllUsersFolder, sProfilesRoot, oFolder
Dim colFSOSubFolders
Dim protuserarray
Dim DeleteFlag
On Error Resume Next ' this is set because the designated file may be locked from deletion
protuserarray = Split(ProtectedUsers,",")
' Instantiate the objects
Set oFSO = CreateObject("Scripting.FileSystemObject")
set oWSH = CreateObject("WScript.Shell")
' Get the Allusers profile folder path first and from this determine profiles parent folder
'
sAllUsersProfile = oWSH.ExpandEnvironmentStrings("%ALLUSERSPROFILE%")
Set oAllUsersFolder = oFSO.GetFolder(sAllUsersProfile)
sProfilesRoot = oAllUsersFOlder.ParentFolder
' Now enumerate all existing user profile folders
Set oFolder = oFSO.GetFolder(sProfilesRoot)
Set colFSOSubfolders = oFolder.Subfolders
' Now go through each existing user profile folder looking for the designated file to delete
For Each objSubfolder in colFSOSubfolders
DeleteFlag = "TRUE"
if oFSO.FileExists(sProfilesRoot & "\" & objSubfolder.Name & "\" & TemplatesFolder & "\" & FileToDelete) then
' Found the file, now establish whether containing folder is on the exempt list
if NOT DeleteProtectedUsers then
For Each element in protuserarray
if ucase(element) = ucase(objSubfolder.Name) then
DeleteFlag = "FALSE" ' mark this occurrence of the designated file as exempt from deletion
exit for
end if
Next
end if
If DeleteFlag then
' File was found in a folder that is not exempt, so go ahead and attempt to delete
oFSO.DeleteFile sProfilesRoot & "\" & objSubfolder.Name & "\" & TemplatesFolder & "\" & FileToDelete,TRUE
end if
end if
Next
' Clean up before exiting
set oFSO = Nothing
set oWSH = Nothing
Posted by:
taz081175
15 years ago
Posted by:
kiptek
15 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.