Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   how to make installation folder a shared on (http://forums.winamp.com/showthread.php?t=230341)

Swapan Das 7th November 2005 12:24

how to make installation folder a shared on
 
Hello everybody,
I'm new to NSIS. I would like to know how to make my installation folder (INSDIR) a shared one through my script.

Instructor 7th November 2005 14:18

XP tested:
code:
Name "Output"
OutFile "Output.exe"

InstallDir "$PROGRAMFILES"
Page directory
Page instfiles

Section
#Share folder
nsExec::ExecToLog 'NET SHARE myfolder="$INSTDIR"'
Pop $0

#Unshare folder
nsExec::ExecToLog 'NET SHARE myfolder /DELETE'
Pop $0
SectionEnd


You can use /OEM parameter in the latest CVS version:
code:
Name "Output"
OutFile "Output.exe"

InstallDir "$PROGRAMFILES"
Page directory
Page instfiles

Section
#Share folder
nsExec::ExecToLog /OEM 'NET SHARE myfolder="$INSTDIR"'
Pop $0

#Unshare folder
nsExec::ExecToLog /OEM 'NET SHARE myfolder /DELETE'
Pop $0
SectionEnd


Swapan Das 8th November 2005 03:54

Dear Instructor,
Thanks a lot for such quick response.
I'll try your code and will get back to you
after testing it.


All times are GMT. The time now is 04:44.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.