Stefan Kell wrote:

>Hi Gerhard,
>
>On Fri, 1 Apr 2005, Gerhard Hofmann wrote:
>
>  
>
>>Hi all,
>>
>>I try to install a service with instsrv.exe from Windows Resource Kit.
>>
>>usage
>>   instsrv.exe ServiceName c:\myprog\myprog.exe
>>works. Problem: the service needs some parameters. I tried
>>   instsrv.exe ServiceName "c:\myprog\myprog.exe -myparam1 -myparam2"
>>and this won't work.
>>
>>instsrv.exe takes the whole expression as a file name and says
>>   unable to find the file at the given path
>>
>>Any ideas?
>>
>>TIA
>>Gerhard
>>    
>>
>
>parameters to services are in the registry, so you have to change the
>registry. The key is something like
>"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceName".
>Navigate to the Parameters subkey. If there isn't one, you have to create
>it.
>
>There is a tool in the resourcekit which will do this, see
>"http://support.microsoft.com/?kbid=251192";
>
>Regards
>
>Stefan Kell
>
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by Demarc:
>A global provider of Threat Management Solutions.
>Download our HomeAdmin security software for free today!
>http://www.demarc.com/info/Sentarus/hamr30
>_______________________________________________
>unattended-info mailing list
>unattended-info@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/unattended-info
>  
>
Id like to point you to the scripts that WPKG use to install their service.

### wpkg-install.bat ###

:: Install Windows Packager

if exist "%SystemRoot%\System32\srvany.exe" goto srvany_installed
copy \\ntinstall\wpkg\files\srvany.exe %SystemRoot%\System32
:srvany_installed

if exist "%SystemRoot%\System32\instsrv.exe" goto instsrv_installed
copy \\ntinstall\wpkg\files\instsrv.exe %SystemRoot%\System32
:instsrv_installed

instsrv "Windows Packager" "%SystemRoot%\System32\srvany.exe"
\\ntinstall\wpkg\files\scripten.exe /Q /R:N
cscript.exe \\ntinstall\wpkg\files\install-service.js
net start "Windows Packager"



### install-service.js ###

var WshShell = WScript.CreateObject("WScript.Shell");
var srvKey = "HKLM\\SYSTEM\\CurrentControlSet\\Services\\Windows
Packager\\Parameters\\";
var appKey = srvKey + "Application";
var parKey = srvKey + "AppParameters";
var srvPath = WshShell.ExpandEnvironmentStrings("%SystemRoot%") +
"\\System32\\cscript.exe"
var srvArgs = "\\\\ntinstall\\wpkg\\wpkg.js /synchronize /quiet";
WshShell.RegWrite(appKey, srvPath, "REG_SZ");
WshShell.RegWrite(parKey, srvArgs, "REG_SZ");


i hope they help in some way :)



-- 
Allan Stones
Optiver Australia PTY LTD
Junior Systems Administrator
Suite A, 1-3 Brodie Street, 
Paddington, NSW, 2021,
Australia
Phone: +61(2)9333 4078
Fax  : +61(2)9333 4044
Email: [EMAIL PROTECTED]
Web  : http://www.optiver.com.au



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
unattended-info mailing list
unattended-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to