Hello
It's possible to create by code an windows account?
And make logins and logouts?
If it's possible can someone tell me how?
I'm talking about windows xp.
Thks
Printable View
Hello
It's possible to create by code an windows account?
And make logins and logouts?
If it's possible can someone tell me how?
I'm talking about windows xp.
Thks
i'm talking in vb code!
Not executing external comands!
Thks
No one?!?
I have to know this, because i have to finish my application by the end of the week.
If there isn't anyway by code, it can be by windows commands?!
How?
Thks
No one knows?
Or isn't posssible?!?!
Sorry, never done it, try MSDN or Googling for info. By doing just that I found what I hope may be a useful link here http://www.codeproject.com/useritems...y_in_vbnet.asp
Thks Bulldog
I'll have a look later...
What i'm doing to need this. I have a friend that ask me to create an application to control the computer... Like this:
1 - The computer starts
2 - Auto-Login with an administrator account (Done in REG)
3 - Run a FullScreen Program that blocks everything (30%)
4 - Then in that program i have two options, login as administrator (closes my app), login as user (change user at runtime, and login with that account). When the user exit i have to logoff the user and return to the administrator account...
So what i want it's create account (when installing the app), change user\login (when using the app).
Anyone can tell me if the Login\Logoff of users can be donne by code?!?!
Or by any type of command in the windows?!!
Still stuck with this..
After some reading i find out that the msgina.dll may help me... But i don't know how to do this? Once again if it's possible?!!?
THks
What do you need to do this from your friend and/or why does he need to do this?
He have a small bar, with 2 pc's.
These pcs are to the costumers go to the web, for office applications and other stuff...
The point is to limit the time of the session and only authorized users can use the computers.
Thks
Oh well they sell software for kiosks and some may be free too. Its allot more secure then trying to write your own. You may want to search for shell replacement.
It's a much better and secure idea to purchase a package to do this. There are some good kiosk and Internet cafe packages around that aren't too expensive. Google on internet cafe software and you'll find a huge number to select from.
If you want to see how to do user impersonation in code, check out this article/code example on my web site: Impersonation Class. It will show you some of the basics of user login management in code but what you're wanting to do goes way beyond that.
I'll try to read something about shell replacement.
But I have almost all things done...
The autologon with reg, the create account by code, block everything while runing the application...
The only thing that i hadn't done, it's the switch user\login....
For this i read about impersonation (i think this doesn't work for what i want). About creating a new desktop (good but i have to put all the apps needed by the user in the new one). About the msgina (the api used by the windows to make the login). And now you talk about shell replacement...
What's the most easy to deploy?
By the way i want to write my own!
I decided to go a different way, instead of make the login automatic, i send the user to the logon screen. With WTSDisconnectSession (Wtsapi32.dll), and this one needs WTSGetActiveConsoleSessionId (kernell32.dll)...
But i have a simple problem, can anyone tell me the conversion from the variables, like Handle = INtptr, long like ?!?!, dword like?!?
thanks
Based on what you have said, I would write a program that handles all of the functions including user logon's, launching apps, automatic application shut down and user log off after a set period of time. I would then replace the explorer shell application with mine and have only one Windows user that automatically logs on and runs the shell app.Quote:
Originally Posted by mickey_pt
The other thing you would need to handling is Control-Alt-Del so the the task manager doesn't immediately show.
2-cents
kevin
Like i said before, the only thing that i can't do, is the login by code, i don't want to replace the shell. So if i can't do the login, i thought in calling the logon screen, and then the user select the "Normal User" Account, then after login, start a timer, and search in the hard drive for a file created by the administrator, with the session time, if the file cannot be found, the user cannot login (return to the logon screen) if the file exists the timer reads the time, and when the time expires calls the logon screen...