Archive: Using variable URLs in Link fields on custom pages?


Using variable URLs in Link fields on custom pages?
I have constructed the URL of a directory on the local file system:


StrCpy $tmp_url "file:///c:/temp"


Can thie $tmp_url be inserted into a Link field on a custom page? I have tried it but the folder does not open up when I click on the link.

Is this possible?

First you have to extract the file somewhere.
Then strcpy $tmp_url "$somewhere\readme.htm"
And finally WriteIniStr "$PLUGINSDIR\custom.ini" "field 2(the actual link field)" "State" "$tmp_url" before show the custom page.
Oops now I see that you want to open a folder with explorer, plz ignore the above :-)


"file://localhost/C:/temp"

[edit]:) your variant also work[/edit]


Originally posted by Instructor
"file://localhost/C:/temp"

[edit]:) your variant also work[/edit]
I have tried this but it doesn't work. Any other ideas? I thought this would've been a simple task to carry out in NSIS?

Originally posted by Instructor
"file://localhost/C:/temp"

[edit]:) your variant also work[/edit]
I've also tried the following just to see if there was a problem with all URLs:


StrCpy $tmp_url "http://www.google.com/"


But this doesn't work either!

Do I need some plugin to allow this functionality to be enabled?

Got it to work guys. Used the following:


StrCpy $var_MANUAL_INST_URL "file://localhost/c:/temp"

InitPluginsDir
File /oname=$PLUGINSDIR\Main_Screen_4a.ini "Main_Screen_4a.ini"
WriteIniStr "$PLUGINSDIR\Main_Screen_4a.ini" "Field 2" "State" "$var_MANUAL_INST_URL"


Cheers guys.