Old 27th July 2006, 18:31   #1
dhalsim2
Junior Member
 
Join Date: Jul 2006
Posts: 4
Question Run a command after installer compilation

Is it possible to run a command from within an .nsi script after an installer has been compiled?

Specifically, I'd like to sign the .exe with Microsoft's signcode.
dhalsim2 is offline   Reply With Quote
Old 27th July 2006, 18:37   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You can run a program on the stub itself, without the data, using !packhdr. However, there's no way to run a program after the installer is completely ready. You can use a batch file for that.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 28th July 2006, 02:23   #3
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
Couldn't you just run the command using a !system or !execute command as the very last line of your NSI script file? (I'm just being curious...)
Comperio is offline   Reply With Quote
Old 28th July 2006, 09:39   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
That won't work as the compression/build process is only performed after the script has been parsed and executed.
You'd need a batch file to run makensis and then run the program.

-Stu
Afrow UK is offline   Reply With Quote
Old 30th July 2006, 22:34   #5
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
Or, create a batch file from an nsis script .

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 31st July 2006, 09:37   #6
bholliger
Senior Member
 
Join Date: Jul 2004
Location: Switzerland
Posts: 223
Batchfile

Hi dhalsim2

Maybe
http://www.jensign.com/JavaScience/w...toSigncode.txt
is of use for you. With this script you dont have to enter the password for the certificate each time.

If you need a sample for NSIS output signing, you can find it on www.quicksupport.org Download, Extract the package, in the Path Paket\ there are several batchfiles.

Hope this helps.

Greetings,

Bruno
bholliger 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