PC Review


Reply
Thread Tools Rate Thread

Adding Service with Srvany

 
 
New Member
Join Date: Oct 2009
Posts: 10
 
      28th Oct 2009
Hello to all,

I'm currently having a problem with regards to adding a service using srvany, I really dont know how.. I know I must use instsrv.exe with that.. I already tried it and I can see the service is already at services.msc. However, it automatically stops immediately after I press start. I am using vbs.
Just to clarify:

1) can we add a vbscript as service
2) if yes, how?
3) do we have to edit the registry.. also how?

I have so many questions in mind.. I have seen .vbs running at startup.. but i dont really understand how to do the same.


Thank you very much!

Jb
 
Reply With Quote
 
 
 
 
New Member
Join Date: Oct 2009
Posts: 10
 
      30th Oct 2009
I've done it.. but not as service.. I have created a script that would loop infinitely until the computer restarts.. add a registry of that file into HKLM and run it at startup. Worked great!
 
Reply With Quote
 
Banned
Madxgraphics's Avatar
Join Date: Apr 2008
Location: In A house
Posts: 4,082
 
      30th Oct 2009
Quote:
Originally Posted by jbconnection
I've done it.. but not as service.. I have created a script that would loop infinitely until the computer restarts.. add a registry of that file into HKLM and run it at startup. Worked great!

Good going, glad you got it sorted then. And thanks for posting back to let us know you have solver your problem, now at least if anybody else has the same problem they can come to you for an answer..

Sorry nearly forgot me manners. Welcome to the forum mate.
 
Reply With Quote
 
New Member
Join Date: Oct 2009
Posts: 10
 
      30th Oct 2009
Thank you sir!
 
Reply With Quote
 
Banned
Madxgraphics's Avatar
Join Date: Apr 2008
Location: In A house
Posts: 4,082
 
      30th Oct 2009
Quote:
Originally Posted by jbconnection
Thank you sir!


No need for the sir bit. Madx will do just fine..................
 
Reply With Quote
 
New Member
Join Date: Oct 2009
Posts: 10
 
      30th Oct 2009
:d
 
Reply With Quote
 
New Member
Join Date: Oct 2009
Posts: 10
 
      30th Oct 2009
By the way.. here's a part of the setup script I used to run the vbs at start up
---------------------------------------------------------------------------
Set winShell = Wscript.CreateObject("Wscript.Shell")
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = winShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )
Set objRegistry = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"
strValueName = "MyScript"

strStringValue="C:\ProgramFiles\MyScripts\MyScript.vbs"
objRegistry.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strStringValue

RestartPC
---------------------------------------------------------------------------
Have Fun.
 
Reply With Quote
 
Banned
Madxgraphics's Avatar
Join Date: Apr 2008
Location: In A house
Posts: 4,082
 
      30th Oct 2009
Again, thanks for sharing your solution with us......
 
Reply With Quote
 
Senior Member
JaLing's Avatar
Join Date: Jul 2008
Location: Stowmarket
Posts: 407
 
      30th Oct 2009
Services don't run continuously... they do end if not coded to restart or wait.
Secondly, it would have to be a mighty big vbs script for you to see it run.

The majority of services are listeners where they just wait untill an external source commands them to do something.... these are the ones you see running (as well as the ones doing stuff).

My main concern is that you've created a forever loop... many programmers will slap your hands and say bad JBC. Unless you've put an awfull lot of tidy up code in there that system will get slower and slower and slower.

Things to note about forever loops....
- memory registers - allocated registers aren't always reused/tidied.
- drive fragmentation - any writing of the drive.

 
Looking for a Tag Line
_-_-_-_-_-_-_-_-_-_-_-

NO! I'm not coming to bed yet....
I'm still playing EVE
 
Reply With Quote
 
Senior Member
captain zed's Avatar
Join Date: Feb 2009
Location: dublin ireland
Posts: 2,086
 
      31st Oct 2009
Forgive me if this sounds silly but can ya not turn the loop off and clean up and defrag and then turn the loop back on again.....sort of like a pitstop for maintenance task ???
Also why will the sytem get slower and slower....i'm just curious cos i'm still learning, also i'm el dopo.

 
In order to be old and wise, first you really have to be young and stupid.....I'm worrying about the wise bit....really i am.

Flickr

Zzzzz
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
windows service console disappeared when the SRVANY.exe in installed in Win2003 JPractitioner@gmail.com Microsoft Windows 2000 Applications 5 7th Jun 2011 05:15 AM
special quit command for custom service? (instsrv.exe, srvany.exe) Edward Scott Windows XP Help 2 7th Apr 2006 05:06 PM
Srvany.exe MikeC Microsoft Windows 2000 Applications 0 28th Jan 2004 07:09 PM
Srvany Service Limitation Dylan Ennis Microsoft Windows 2000 1 24th Jul 2003 04:02 PM
Install service with instsrv.exe and srvany.exe ken Microsoft Windows 2000 Advanced Server 0 14th Jul 2003 01:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:46 AM.