blue_harvester
22nd May 2006 17:22 UTC
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?
Red Wine
22nd May 2006 17:43 UTC
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 :-)
Instructor
22nd May 2006 17:44 UTC
"file://localhost/C:/temp"
[edit]:) your variant also work[/edit]
blue_harvester
22nd May 2006 21:53 UTC
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?
blue_harvester
22nd May 2006 21:57 UTC
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?
blue_harvester
23rd May 2006 09:32 UTC
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.