/build/static/layout/Breadcrumb_cap_w.png

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!

0 Comments   [ + ] Show comments

Answers (6)

Posted by: dunnpy 14 years ago
Red Belt
1
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
Posted by: Jos 9 years ago
White Belt
1
I'd agree with the first paragraph of Dunnpy's answer, but if you really need to for other reasons (no DNS infrastructure or something) you can fire off a script as SYSTEM when the AppV application is registered. The process is described here:
http://www.lieben.nu/numb3rs/?p=62
Posted by: Sirish727 14 years ago
Senior Yellow Belt
0
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
Posted by: lurims 14 years ago
Senior Yellow Belt
0
I guess changing the HOST file on the machine just of a particular app to work is not good option. While you sequence the application, try to add a host file in VFS folder. I am not sure this works, as some things a really machine dependent and are the core component of the OS not of application's.
Posted by: kkaminsk 14 years ago
9th Degree Black Belt
0
I ran into an application with a similar requirement. You must edit the physical copy of the file because the virtual copy won't be seen by the operating system. Ideally the application would not require a custom hosts file but thats life.
Posted by: ksaunam 14 years ago
Orange Senior Belt
0
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
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ