BLOG     |     FORUM
Welcome, Guest
Username: Password: Remember me
All your questions answered real quick by Unleash Networks Engineers.
  • Page:
  • 1
  • 2

TOPIC: running unbrowse as a service

Re:running unbrowse as a service 16 years 5 months ago #159

hi
cheers for help so far and am almost there with it. just some little things now

how do i get the file to save in a specified folder at the moment its saving in the system32 folder.

also although am not get authentications failed am not getting success either, its coming back as not authorized. this is not a major thing would just to know how its done in the script.

next is to make it a service if you can point me in the right direction with this am sure i will muddle through. i under stand i have to use INSTSRV.EXE.

cheers

yale
The administrator has disabled public write access.

Re:running unbrowse as a service 16 years 5 months ago #160

  • netscript
  • netscript's Avatar
Hi,

Try specifying the full path name in TrapMgr.SaveAs

You might want to store the trap databases under a subfolder in the My Documents folder.

for example

[code:1]
set WshShell = WScript.CreateObject(\"WScript.Shell\"«»)
strRoot = WshShell.SpecialFolders(\"MyDocuments\"«»)
strDB = strRoot & \"\\TrapDatabases\\\" & \"MyDB_1.votrp\"

...
TrapMgr.SaveAs strDB
[/code:1]

----
A tip for writing a service : do not write any messages to the console (Stdout). Instead write to a file under My Documents or to the Windows Event log using LogEvent.

Yes, Instsrv and Srvany can be used to install any program as a Windows service. I will try to get some help here, it may take a couple of days though.

You can refer to the Windows Script Host documentation for various helper methods for manipulating files and directories on Windows. msdn2.microsoft.com/en-us/library/d1et7k7c.aspx



----
About the authentication problem. Start Unbrowse (the GUI) and check if the agent information is available for the user running your script. The way it works is : the server (ATSNW3.exe) receives the incoming traps and checks the authentication parameters in the trap against the locally added agent information (auth password, username etc).


Hope that helps,

Vivek
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: vivek [unleash]
Time to create page: 0.029 seconds