ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Coding Snacks

Quick method to do simple task -must be a one click fix for those who need it :)

(1/4) > >>

questorfla:
OK, I hope someone is in this morning.  This is easy but I can't figure out how to get it into a batch file for the people I am having to walk through manually.

I have a program that has a config file inside "/programdata/myprog/" so no one can even see it.
The file points the user to the correct IP address for the program to work.  I wrote a short script that I then made a shortcut to and gave the shortcut admin rights which swapped out the corrected cfg for the old one.

This worked for ME and for some people but not for others.  When I check their copy of "getthere.cfg" it is still the old one.

I need to edit the cfg file they have to change the only occurrence of IP "12.34.56.78" to IP "12.34.56.90".

How can I send them a script that will run "as admin" to open "c:\programdata\myprog\getthere.cfg" and change that ONE IP.  It is the only occurrence of the IP in the cfg file..

If I try to send them the new config file they can't insert it without admin permissions and I would never tell any of them how to get that ;)

And it has to be a one click fix.  That is all they can handle.

Ath:
You could create a small Inno Setup installer with just a single [ini] entry to fix that. The default settings are to run as Administrator (after confirmation of the 'unknown publisher' as you probably don't have a code-signing certificate, and a UAC question), and just a few Next clicks further (after disabling almost all screens, 1 or 2) it should be fixed.
I can help you out with the script if you want.

questorfla:
might need you to as I do not know anything about "inno setup"  Never heard of it but if it does what I need this time, there are other times I have had (and will have) to do this again.
any way you can PM me or email or something so I don't have to clog up the board with something that probably wont help anyone but me?

MilesAhead:
You could create a small Inno Setup installer with just a single [ini] entry to fix that. The default settings are to run as Administrator (after confirmation of the 'unknown publisher' as you probably don't have a code-signing certificate, and a UAC question), and just a few Next clicks further (after disabling almost all screens, 1 or 2) it should be fixed.
I can help you out with the script if you want.
-Ath (December 06, 2014, 02:57 PM)
--- End quote ---

Great idea.  Especially since Inno has a subset of Pascal for scripting.  Very straightforward to use.   :Thmbsup:

questorfla:
I already sent to you in your PM box

Navigation

[0] Message Index

[#] Next page

Go to full version