Sign in to follow this  
Followers 0
shornw

Error codes for Services.au3

8 posts in this topic

I may be missing something very basic here. I am using Services.au3, and get error 6 when starting a service. I'm sure error 6 relates to a permissions (the test was deliberately run using an account with no admin access on the server) I have looked everywhere I can think of (including Google) but can't find descriptions for errors relating to this UDF. A list of relevant errorcode meanings would be helpful for more accurate error reporting.

$start = _Service_Start($sname, $computer)
If $start <> 1 Then Return FileWriteLine($log, $date & " " & $computer & " The start request sent to service " & $sname & " failed with error " & @error)

Any suggestions or pointers gratefully received


[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Share this post


Link to post
Share on other sites



I have looked everywhere I can think of (including Google) but can't find descriptions for errors relating to this UDF.

System Error Codes

6 - The handle is invalid.

I think that the error is due to the OpenService() which returns 0. And why, you need to dig deeper.

Share this post


Link to post
Share on other sites

I had a quick look at the source and it seems that the value of @error is returned by function _WinAPI_GetLastError.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thanks for this Yashied. I can't get to the link atm (company surf control ;) ) but I'll have a look later at home.

Error 6 could be an invalid handle, due to the lack of admin access (it is definitely admin access as the script runs OK with rights)


[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Share this post


Link to post
Share on other sites

Thanks also, Water. Sorry, I must have been posting at the same time you were.


[font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font]

Share this post


Link to post
Share on other sites

Yashieds explanation is more complete than mine ;)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

This link works.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0