#134810 - 2005-03-02 03:56 PM
XNET.exe without adminrights
|
Anonymous
Anonymous
Unregistered
|
Hi
Is it possible to run XNET.exe without admin privileges ? My script works fine but not without rights !!!
Maybe there are other ways to realise it ?
Bye Sam
|
Top
|
|
|
|
#134812 - 2005-03-02 05:23 PM
Re: XNET.exe without adminrights
|
Anonymous
Anonymous
Unregistered
|
I would like to check, If a service is running or not
|
Top
|
|
|
|
#134816 - 2005-03-02 06:06 PM
Re: XNET.exe without adminrights
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
Code:
Shell '%comspec% /c net start | find /i "Service name goes here" > nul' If @ERROR ? "the service was not running" EndIf
|
Top
|
|
|
|
#134819 - 2005-03-02 06:51 PM
Re: XNET.exe without adminrights
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
WMIQUERY() should also address this need.
Kent
|
Top
|
|
|
|
#134822 - 2005-03-03 11:26 AM
Re: XNET.exe without adminrights
|
Anonymous
Anonymous
Unregistered
|
I check with the loginscript if the service run or not, If not i will send a message and start it. The problem for me was, that the users didn't have admin rights and so the xnet.exe can't query the service database. Now I will try it with the net start methode.
Thanks Sam
|
Top
|
|
|
|
#134823 - 2005-03-03 12:00 PM
Re: XNET.exe without adminrights
|
Anonymous
Anonymous
Unregistered
|
Yep
Works really fine, but if I have services they have similar names
Windows Management Instrumentation Driver Extensions Windows Management Instrumentation
there I have the next problem, if I would only check the Windows Management Instrumentation service.
Do you have an idea, how tho check that ?
Bye Sam
|
Top
|
|
|
|
#134825 - 2005-03-03 05:08 PM
Re: XNET.exe without adminrights
|
Anonymous
Anonymous
Unregistered
|
I have checked it, that didn't work
|
Top
|
|
|
|
#134826 - 2005-03-03 05:26 PM
Re: XNET.exe without adminrights
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
you will have to look into using WSHpipe() then.
Code:
$service = "Windows Management Instrumentation" $netstart = Split(Join(Split(Join(wshpipe("net start",1),"")," "),""),CHR(13))
If AScan($netstart,$service)+1 ? "The service " + $service + " is running" Else ? "The service " + $service + " is NOT running" EndIf
|
Top
|
|
|
|
#134827 - 2005-03-07 03:42 PM
Re: XNET.exe without adminrights
|
Anonymous
Anonymous
Unregistered
|
that doesnt work error comma fails
|
Top
|
|
|
|
#134829 - 2005-03-07 04:45 PM
Re: XNET.exe without adminrights
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
the problem is this
Quote:
Windows Management Instrumentation Driver Extensions Windows Management Instrumentation
he wants to check for the service "Windows Management Instrumentation" to see if it is running.
if you run this.
shell '%comspec% /c net start | find /i "Windows Management Instrumentation" > nul'
and are depending on FIND's setting of the @error to determin if "Windows Management Instrumentation" is running or not. you will get a false positive if "Windows Management Instrumentation Driver Extensions" is running and "Windows Management Instrumentation" is not running.
the FIND command will find both of these....
Windows Management Instrumentation Driver Extensions Windows Management Instrumentation
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 286 anonymous users online.
|
|
|