Ga naar inhoud


Batch file compatibility settings standaard op 'Run as Administrator'


Sjattuh

Aanbevolen berichten

Ik heb een klein batch filetje gemaakt met 1 net start functie om een bepaalde service te starten.

 

Dit werkt allemaal prima zolang ik hem rechtsklik en kies voor 'run as administrator'.

 

Ik wilde dit echter standaard maken in de settings onder de Comaptibility tab, maar dit is grijs.

 

Alle users hebben full control en het is een user met admin rechten.

 

Iemand een idee waarom deze greyed out is?

 

Thx

post-36485-1318261890,3894_thumb.jpg

Weet je wat erger is dan een worm in je appel?

Een halve worm in je appel...

Link naar reactie
Delen op andere sites

  • 2 weken later...

probeer het eens door in de shortcut cmd /c for het path van het batch file te zetten.

 

 

denk dat je net start of net stop ook direct kan gebruiken zonder ze eerst in een batje te zetten.

 

anders kun je ook psservice van sysinternals gebruiken:

 

Citaat:

Using PsServiceThe default behavior of PsService is to display the configured services (both running and stopped) on the local system. Entering a command on the command-line invokes a particular feature, and some commands accept options. Typing a command followed by "- " displays information on the syntax for the command.

 

Usage: psservice [\\computer [-u username] [-p password]] <command> <options>

 

query Displays the status of a service.

config Displays the configuration of a service.

setconfig Sets the start type (disabled, auto, demand) of a service.

start Starts a service.

stop Stops a service.

restart Stops and then restarts a service.

pause Pauses a service

cont Resumes a paused service.

depend Lists the services dependent on the one specified.

security Dumps the service's security descriptor.

find Searches the network for the specified service.

\\computer Targets the NT/Win2K system specified. Include the -u switch with a username and password to login to the remote system if your security credentials do not permit you to obtain performance counter information from the remote system. If you specify the -u option, but not a password with the -p option, PsService will prompt you to enter the password and will not echo it to the screen.

 

Link naar reactie
Delen op andere sites

Misschien nog een paar ideeen:

- Je kan een scheduled task maken, in Windows 7 / Server 2008 is dit erg uitgebreid. Staat bij de Administrative Tools/Systeembeheer

- Je kan UAC uitzetten, als je dat wilt..dan wordt er niet meer gevraagd om met "Elevated priveleges" het commando te openen. (Eventueel kan je ook via Group policies het gedrag aanpassen voor Admins, maar daar komt even wat meer bij kijken).

- Je kan het misschien ook doen vanuit de Registry "RUN" registry hive..

 

--- Rebox RE8000HD L1.54 V1.11.57 ---
--- Rebox RE9000HD L1.54 V1.11.57 ---
--- Philips 46PFL9705 ---
--- Visiosat Bi-satellite HB-A1-A2-A3 ---

Link naar reactie
Delen op andere sites

Maak een account aan of log in om te reageren

Je moet een lid zijn om een reactie te kunnen achterlaten

Account aanmaken

Registreer voor een nieuwe account in onze community. Het is erg gemakkelijk!

Registreer een nieuwe account

Inloggen

Heb je reeds een account? Log hier in.

Nu inloggen
  • Wie is er online   0 leden

    • Er zijn geen geregistreerde gebruikers deze pagina aan het bekijken
×
×
  • Nieuwe aanmaken...