Skip to content
⌘ NSIS Forum Archive

Driver Installation Query

9 posts

ptgoel#

Driver Installation Query

Hi,

i am looking forward to install my device driver along with my application. For this purpose i have written a small code(install.exe) which installs the driver via command line. e.g.

install -i xxx

This will install xxx driver on Windows System. i want to execute the same command while installing via package, so that user intervension is not needed.

Does NSIS offers something like this kind of facility to execute our own command? If yes! how to do that.

if not! can you suggest me some way of doing this.

regards,
Aman
ptgoel#
Hi,

;install driver
nsExec::Exec "InstallVD.exe -l C:\Documents and Settings\Administrator\Desktop\VD\Driver\VD.inf -c p -i VD"

I added this command in the code. but it is not working(on command line it works). am i supposed to specify something else too.

rite now InstallVD.exe is in VD directory. am i supposed to put it in some other directory.

regards
deguix#
but it is not working(on command line it works).
So you have to put the correct location where "InstallVD.exe" is located.
ptgoel#
done! but still not working

This is what i did.

nsExec::Exec "C:\InstallVD.exe -l C:\Documents and Settings\Administrator\Desktop\VD\Driver\VD.inf -c p -i VD"

it compiles without any problem. but at installation time it doesn't work.

regards
Bennyyy#
use this
(i found it in the nsis user manual)

4.9.1.3 ExecShell action command [parameters][SW_SHOWNORMAL | SW_SHOWMAXIMIZED | SW_SHOWMINIMIZED]

Execute the specified program using ShellExecute. Note that action is usually "open", "print", etc, but can be an empty string to use the default action. Parameters and the show type are optional. $OUTDIR is used for the working directory. The error flag is set if the process could not be launched.
deguix#
Probably because one of the files aren't in those folders when you call this command. Use IfFileExists command to check if those files are in the correct locations.
KenA#
Hi,

try this syntax (beware of the quotes within quotes):

nsExec::Exec '"InstallVD.exe" -l C:\Documents and Settings\Administrator\Desktop\VD\Driver\VD.inf -c p -i VD'

hope it helps,

KenA