Old 16th June 2003, 17:53   #1
Mark Beckwith
Junior Member
 
Join Date: Jun 2003
Location: Fort Worth, TX
Posts: 3
WriteINIStr for URL link

First of all, let me say how overjoyed I am now that I am
using NSIS. I did more with NSIS in 2 days than I was able
to do in months with InstallShield. And the installation is
1/2 the size! I keep thinking I forgot to add something.

Anyway, there is obviously something I'm conceptually
missing. I took the makensis.nsi script and hacked away on
it until I had it working with our much simpler
installation. Everything works fine but:

I have this in my nsi script:

SetOutPath $INSTDIR

WriteINIStr "$SMPROGRAMS\Intrig Insight\Intrig Online.url" \
"InternetShortcut" "URL" "http://www.intrig.com/"

That is, I want to add a link to my company's home page.
After installing, I click on the shortcut, and I get a
windows error:

"The address at 0x32452434 cannot be written" (or something
like that). And then the explorer bar goes away and I have
to logout and log back in to get it to work again. Not
exactly an ideal user experience!

Could you tell me what I'm missing. Looks like a newbie
error to me. If you need more info please don't hesitate to ask.

Thanks,

Mark
Mark Beckwith is offline   Reply With Quote
Old 16th June 2003, 18:28   #2
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
I don't know maybe: "http://www.intrig.com" (without the "/")
I don't see way isn't work, the script is fine.
maybe the "\" in your script....


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 16th June 2003, 20:22   #3
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
I don't think that makes sense.

Does it work if you create a .url file manually?
Joost Verburg is offline   Reply With Quote
Old 16th June 2003, 20:36   #4
Mark Beckwith
Junior Member
 
Join Date: Jun 2003
Location: Fort Worth, TX
Posts: 3
Sure. I made a .url file on the desktop and it works fine.

Now, when I did a search on "Intrig Online", it turned up nothing. So I guess the url file is not being created. Do I have to create the INI file somewhere in my script?
Mark Beckwith is offline   Reply With Quote
Old 16th June 2003, 20:58   #5
ramon18
NSIS Dev
 
ramon18's Avatar
 
Join Date: Apr 2003
Location: Portugal
Posts: 110
Try this simple script and tell us the result,
this script just generate one url on your desktop

Quote:
Name TestURL
OutFile TestURL.exe


Section XDummy

SetShellVarContext all
WriteIniStr "$DESKTOP\TestURL.url" "InternetShortcut" "URL" "http://nsis.sourceforge.net/"

SectionEnd
Btw: this seams to be a shell problem of your box, you can use notepad and open the "TestURL.url" and see if the contents is valid, for me is:


[InternetShortcut]
URL=http://nsis.sourceforge.net/


Cyas
ramon18 is offline   Reply With Quote
Old 16th June 2003, 21:53   #6
Mark Beckwith
Junior Member
 
Join Date: Jun 2003
Location: Fort Worth, TX
Posts: 3
The above script works fine. The problem occurs when I try to writeINIStr to the shortcut in the start menu. The url file gets created in the current user, but I get the "Cannot read address 0x00000000" error when I click on it. And I noticed that if I click on the Start>Programs>NSIS>NSIS Development Site, I get the same error. So it looks like there is something wrong with my machine setup.
Mark Beckwith is offline   Reply With Quote
Old 17th June 2003, 10:47   #7
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Yes, there must be something wrong with your machine. Works fine here.
Joost Verburg is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump