Pergunta

I need to install some script/application that runs every time at startup and performs some operations under the user privileges. Can you please point me in the right direction?

My script would check whether the current version of certain .NET application (which runs very slow if not compiled, very fast if compiled) has been compiled. If negative, it would compile it (with NGEN.EXE). As we know the .NET apps must be compiled on a machine-by-machine basis.

This check must be performed every time the machine starts up.

Foi útil?

Solução

There's a simple registry key for that:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

Just add an arbitrarily named string value with the name of the script to run. There's also a corresponding key in HKCU, if you want to do it for certain users only.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top