OSD Script to Appent to Hosts file
Hi,
We have an application that needs IP addresses added to the HOSTS file on the machine to run properly. Since App-V cannot sequence Hosts file we wrote a .vbs to append what we need to the hosts file and added that .vbs script to the OSD file for the application. Now this works for any user who has local admin rights on their machine but fails for any non-admin users so obviously the App-V client is using the credentials of whoever is logged in to run the script. Anyone have any suggestions as to how to have the OSD script to run as elevated rights even if a non-admin user is logged in?
Thanks!
We have an application that needs IP addresses added to the HOSTS file on the machine to run properly. Since App-V cannot sequence Hosts file we wrote a .vbs to append what we need to the hosts file and added that .vbs script to the OSD file for the application. Now this works for any user who has local admin rights on their machine but fails for any non-admin users so obviously the App-V client is using the credentials of whoever is logged in to run the script. Anyone have any suggestions as to how to have the OSD script to run as elevated rights even if a non-admin user is logged in?
Thanks!
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
dunnpy
14 years ago
The correct way would be to get your network setup to correctly resolve the hostname, rather than require an entry in the hosts file - I've not seen an application that actually requires an entry.
Failing that, you could write your vb script could provide alternative credentials to modify the file (google it), but then are you removing the entry with a similar script OSD when the App-V application closes?
Otherwise why don't you distribute an updated hosts file to every machine, with all of the IP addresses you need, using your preferred deployment tool - which will handle the permissions to modify/update/replace the file?
Hope that helps,
Dunnpy
Failing that, you could write your vb script could provide alternative credentials to modify the file (google it), but then are you removing the entry with a similar script OSD when the App-V application closes?
Otherwise why don't you distribute an updated hosts file to every machine, with all of the IP addresses you need, using your preferred deployment tool - which will handle the permissions to modify/update/replace the file?
Hope that helps,
Dunnpy
Posted by:
Jos
10 years ago
Posted by:
Sirish727
14 years ago
I think adding vb script to the osd fille will not work basically we are virtuliasing the application so the application will not modify any thing in the base system.
Better you send vb script sepereatly to the client machines using any software distrubution tools(SCCM,CA DSM)...hope this helps you.
Thanks,
Sirish Kumar K
Better you send vb script sepereatly to the client machines using any software distrubution tools(SCCM,CA DSM)...hope this helps you.
Thanks,
Sirish Kumar K
Posted by:
lurims
14 years ago
Posted by:
kkaminsk
14 years ago
Posted by:
ksaunam
14 years ago
Hmm, I wonder.. has anybody really tried hosts -file virtualization? I ask this because I have virtualized services -file in the same location and it worked just fine for the application (SAP Frontend).
Granted, components which uses those two files may be different but maybe in some scenario it could work for hosts file as well?
/Kalle
Granted, components which uses those two files may be different but maybe in some scenario it could work for hosts file as well?
/Kalle
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.