palli011000
asked on
NT Question
i have set of component that add user to an nt machine, and i add user that are not in administrator group, but i can add him to administrator group on the fly, and when i have newly created this user and set him to administrator group i want to be able to refresh nt accounts / login on the fly, not logoff and logon again to the changes will take effect. So i ask you Experts good, is this possible?
Regards
Palli
ASKER
Can you ask anybody?, you are deeper in this either than me.
I think this is possible with undocumented functions
I think this is possible with undocumented functions
be interesting to know what functions these programs are calling ;-):
http://www.ntfaq.com/ntfaq/util5.html
http://www.ntfaq.com/ntfaq/util5.html
Would be, wouldn't it!
Interesting to see win2k has RUNAS.EXE to run as another user - just what he wants! (If only...)
Cheers,
Raymond.
Interesting to see win2k has RUNAS.EXE to run as another user - just what he wants! (If only...)
Cheers,
Raymond.
ASKER
Yes this program NUSe works very fine, i like to know how to do this in Delphi Code, mabe this is some API functions or .dll, can i build service with forms and edit boxes and more?
probably do this using createprocessasuser() api..
no im fairly confident you dont wanna put forms in a service ..
else why not just create app that runs when services start by adding it to the registrys "runservices" key.
no im fairly confident you dont wanna put forms in a service ..
else why not just create app that runs when services start by adding it to the registrys "runservices" key.
ASKER
What is that? RunServices
it is key in registry where you write some pseudo name as a string and for its value write the full path to your program and then it starts as soon as windows starts (before the logon screen),this is how services are started.
if you need a code example of writing to the registry just shout.
open regedit.exe and go to:
hkey_local_machine
software - windows - currentversion - Runservices
then you see where i mean.
if you need a code example of writing to the registry just shout.
open regedit.exe and go to:
hkey_local_machine
software - windows - currentversion - Runservices
then you see where i mean.
ASKER
this value is not available at my computer, can you show me how to do it in code add my program as service start or take it back (delete)
Thanks
Palli
Thanks
Palli
aw heck im being thck.
there is no runservices key in winnt
(this key exists for win9* only)
you'd be wanting the run key instead (this is where systray is started from)
before i post some code (for the run key)is this what you want :
for your program to start as soon as windows is started ?
there is no runservices key in winnt
(this key exists for win9* only)
you'd be wanting the run key instead (this is where systray is started from)
before i post some code (for the run key)is this what you want :
for your program to start as soon as windows is started ?
ASKER
yes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Palli is happy now!!! thanks to Barry
im glad your happy ;-)
Cheers,
Raymond.