How to replace text box value into property file using NSIS script? - nsis

I have created nsi file using NSIS plugin in eclipse.I have read the property file value using following code,
${ConfigWrite} "C:\resource\conf.properties" "WEBSERVICE.URL" $0
Now i want to create one text box and copy the value of "WEBSERVICE.URL" into that textbox.If the user enter the input in textbox then it should replace the value of WEBSERVICE.URL in config property file.else it will take default value.can anyone hele me?

You should look at the examples of nsDialogs.
Look in the Examples\nsDialogs directory of your NSIS installation : the InstallOptions.nsi script should help you.

Related

Blue Prism expression to get most recent file from folder

I am trying to write an expression on putting an attachment in the Outlook VBO and keep getting error that it cant find the file.
The file name is Investment Value_2022-12-13h12m37s45.xlsx bit everything after value will be different.
I have tried writing it as a wild card.
"C:\Users\AAPWP\Downloads\Investment*"
I tried filtering it into its own collection and getting it that way.
"File.File"
Trying to get the file path from a filtered collection.
"Attachment.Folder.Name"
Anybody having the same issue and any help would be appreciated.
Use 'Utility - File Mangement: Get Files' action to get all excel files
Loop through each file name and use 'Decision' action to check for file name pattern
Use formula - InStr([Files.Name], "Investment Value_") > 0
If True, then thats the file you need

Windows 7 advanced file searching criteria syntax

I need some help with the windows file search syntax for the criteria that the file name ends with 'xml' and the contents of the file contain the string 'bean'. So far I have it as:
System.FileName:~>"xml" AND
what do I need to put after the AND?
Figured it out:
filename:~> xml AND content: bean

How to read values from property file using innosetup?

I'm trying to read values from demo.properties file using innnosetup.Here is my demo.properties file hibernate.connection.username=James
hibernate.connection.password=Jack
hibernate.connection.url=jdbc:jtds:sqlserver://8080/clientDB
hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver
I want to read this file and show values as James,Jack and 8080 in user interface.
Can anybody guide me how to get only those particular values?
Here's a guide:
Use Pascal-Script in the [code] section
Work with LoadStringsFromFile() (http://www.jrsoftware.org/ishelp/index.php?topic=isxfunc_loadstringsfromfile) to get the file content.
Iterate over the lines using a for loop
Use Pos() (http://www.jrsoftware.org/ishelp/topic_isxfunc_pos.htm) to find the position of the = sign
Use Copy() (http://www.jrsoftware.org/ishelp/topic_isxfunc_copy.htm) extract key and value from the current line using the position of =
In case you need more functions take a look here: http://www.jrsoftware.org/ishelp/index.php?topic=scriptfunctions
A problem close to yours has been solved here: Find and read specific string from config file with Pascal Script in Inno Setup

how to set default file name extension in CMFCEditBrowseCtrl::EnableFileBrowseButton?

how to give default file name extension in CMFCEditBrowseCtrl::EnableFileBrowseButton? How the arguments should be passed? I tried like following code.
CMFCEditBrowseCtrl py_file_path;
py_file_path.EnableFileBrowseButton(_T"PY",_T"*.py");
But it is not displaying the .py files. It says "no items matches". I guess there is some problem with the lpszDefExt and lpszFilter values i use. Could anyone tell me what is the value of those arguments to list all .py files?
You need to set it like this:
CMFCEditBrowseCtrl py_file_path;
py_file_path.EnableFileBrowseButton(_T("PY"), _T("Python files|*.py||"));
The final argument is a filter string, where the description and filter are delimited by |.

Powershell: Formatting executable

I'm trying to create a script that will format the output of w32tm.exe /monitor and display in a table the server name, NTP offset, and RefID.
I'm a little unaware of how to go about getting the output from an executable file to format it and was wondering if someone here could help me. Right now I'm trying this:
$executable = w32tm.exe /monitor
$executable | Format-Table -View "Server Name", "NTP offset", "RefID"
How can I manage to get the executable to be formatted in a table to display those specific parts of the exe?
Hi I also needed to do this before I found a function someone made to do this have a look I am sure you can change it to suit your needs or just use it as is .
ps-function
Article on how it works

Resources