Archive: Extension DLL - Windows Service Functions & Is Administrator Check


Extension DLL - Windows Service Functions & Is Administrator Check
I've no idea if this is the place to post this, feel free to swear at me if I get it wrong (or just for the hell of it :D).

I started using NSIS about two days ago and it's awesome. I needed a couple of features and being a coder I just wrote them myself using an extension dll, I'm sorry if I've duplicated someone else's effort and am thus wasting your time, but I hope this is useful to someone.

The code is a little messy. I'll wait to see what people say and incorporate any changes/requests/bug fixes/etc and upload a new version with better docs too (unless people tell me it's crap :p)

The DLL provides the following functionality :-

- IsProcessUserAdministrator
- HasLogonAsAService
- GrantLogonAsAService
- RemoveLogonAsAService
- IsServiceInstalled
- IsServiceRunning
- SendServiceCommand [ start | stop | pause | continue | delete ]

All functions expect arguments on the stack, full docs are in the .zip file provided along with an explanation of who might need the functionality and what it does. Source code included.

Get it here: http://www.clantpa.co.uk/nsis/x18servicesV0.0.zip [ only ~18 kb! ]

---

Ximon Eighteen
Programmer @ Advent Publishing Systems

email: ximon_eighteen@3b2.com
& msn: ximon_eighteen@hotmail.com


Sorry, can't download that file .. zip file seems incompete ... :eek: :(


D**n
D****t. I've just found out that I can't open a load of zipped stuff I made earlier today. At work we use a zip program other than WinZip and I've never had a problem with it before but that's the only reason I can think of for this problem (I uploaded it from work see). The tests I did at work were fine but you are perfectly correct, my home computer can't make head nor tail of the file either.

I'll see if I can fix the problem tonight (I don't have all of the files I made with me at the mo) if not it will be fixed by about 9.30am tommorow.

Grrr. I'll post back here once I resolve the problem.

---

Ximon Eighteen
Advent Publishing Systems
email: ximon_eighteen@3b2.com
& msn: ximon_eighteen@hotmail.com


Humourous happenings
I'm very sorry if I have annoyed or upset anyone with my language in the previous post, I have to say that I personally didn't mean what I said in an angry manner and that it was intended to be slightly jokey, hence things like the "grrr". At any rate it was rightly pointed out that it could be taken to be offensive so I apologise for that.

This seems to be a good day for mistakes huh ;-)

I've determed what happened to the uploaded file but there's nothing I can do to replace the file until tommorow morning (well I could hack together the old copy I have at home but that would likely just result in a bug-ridden upload so I'll wait until I can get at the version that I spent time polishing up).

In the meantime (this is jumping the gun a little I know) if anyone has any NT security or other Win32 API stuff that they'd like to see in an extension DLL I can put that kind of thing (and lots of other stuff) together quite quickly and easily so feel free to request stuff and I'll honestly tell you if I can do it or not.

---

Ximon Eighteen
Advent Publishing Systems
email: ximon_eighteen@3b2.com
& msn: ximon_eighteen@hotmail.com


Fixed
I have now uploaded a fixed copy of the zip file (and tested the download, the zip expansion, the use of the included dll and the compilation and use of the source code included).

I also made another mini dll last night for another thread on this forum. I'll collect any dlls I make and make a web page which will be at http://www.clantpa.co.uk/nsis/. If you don't see the web page yet don't worry, it will be up later today.

The other file was made for a very specific purpose, see this thread if you are interested before the web page containing details is created: http://forums.winamp.com/showthread....threadid=90606

---

Ximon Eighteen
Programmer @ Advent Publishing Systems
email: ximon_eighteen@3b2.com
& msn: ximon_eighteen@hotmail.com