Sign in to follow this  
Followers 0
AllSystemGo

Easy question

37 posts in this topic

I would like to create a script for some of my user when their profile get corrupted. So I need a script that is going to reboot the machine log in with a user on the windows/novell panel then copy some stuff and log back with the user.

So my question is this, is their a way a script reboot a machine, then when the machine is up log in a administrator account ???

Thanks for your help.

Chees

Share this post


Link to post
Share on other sites



Anyone!! :whistle:

Share this post


Link to post
Share on other sites

I would like to create a script for some of my user when their profile get corrupted. So I need a script that is going to reboot the machine log in with a user on the windows/novell panel then copy some stuff and log back with the user.

So my question is this, is their a way a script reboot a machine, then when the machine is up log in a administrator account ???

Thanks for your help.

Chees

There is a way to do this. You have to modify the registry to add the admin account info that you want to use when it reboots. You need to create your script to reboot the machine and you can use the shutdown() function in autoit but you will need to write to the registry with autoit first. Use the KB article to show you where to right your admin info for the admin account. You can also add a script to do something once it is logged in and you can put that in the RunOnce key in the registry and upon login it will execute that script. All this should help you get on your way.

http://support.microsoft.com/kb/315231

This should give you what you need.


EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

Ok so basically what i should do is this, and correct me if I'm wrong:

1- Start the first part of my script create the registry key to autologon and put the script in the RunOnce key

2- Reboot the machine

BTW: Thxs for the information. It's greatly appreciated. But I would like to know if it's the same thing would apply if I'm using a novell client to log in??

Thxs

Share this post


Link to post
Share on other sites

BTW: Thxs for the information. It's greatly appreciated. But I would like to know if it's the same thing would apply if I'm using a novell client to log in??

This should work if you know the Admin Password and are able to log in manually. However, I'm am suspicious, as Novell is used by my school. So if you are just trying to break into your school's Admin account, good luck, because there is no registry key that can do this without the Admin password being known by the user.

Share this post


Link to post
Share on other sites

No no.. I do have the passwords and I'm not trying to break into anything. All I want to do is a scripts that rename the Documents and Settings of the corrupted profile, rename the one on the network then restart the session with the user and copy back all his files. And the resons why I need to reboot the machine is sometimes even if I log out the user session and log back with admin the account can't copy as it still locked!!

That's it

But thanks for your concern!!!

Cheers

BTW I have better things to do with my time then trying to hack the admin account at school, that would be IF I would be in school!!! :whistle:

Share this post


Link to post
Share on other sites

No no.. I do have the passwords and I'm not trying to break into anything. All I want to do is a scripts that rename the Documents and Settings of the corrupted profile, rename the one on the network then restart the session with the user and copy back all his files. And the resons why I need to reboot the machine is sometimes even if I log out the user session and log back with admin the account can't copy as it still locked!!

That's it

But thanks for your concern!!!

Cheers

BTW I have better things to do with my time then trying to hack the admin account at school, that would be IF I would be in school!!! :whistle:

It might work but I don't know with the Novell client. If you don't have to use the Workstation only box then i don't see why it wouldn't work. Give it a try.


EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

Thxs for your help guys. I'll give it a try and keep you posted on that!

:whistle:

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Is there a easy way to backup a complete branch, HKLM ou simply HKLM\SOFTWARE\Microsoft, or the complete registry before I start making some changes in it with Autoit? Right now I'm using RegWrite to create my own key..

And can you tell me if their is an easy way to encrypt the passwords that I put in my scripts?? Cause right now all it takes is someone with autoit to decompile my scripts and voilà he has all my admin passwords!!

Thank you again

Cheers

Edited by AllSystemGo

Share this post


Link to post
Share on other sites

Is there a easy way to backup a complete branch, HKLM ou simply HKLM\SOFTWARE\Microsoft, or the complete registry before I start making some changes in it with Autoit? Right now I'm using RegWrite to create my own key..

And can you tell me if their is an easy way to encrypt the passwords that I put in my scripts?? Cause right now all it takes is someone with autoit to decompile my scripts and voilà he has all my admin passwords!!

Thank you again

Cheers

Yes go into the registry using regedit from the run line in windows. go to that key and once you have selected that key, then go to File/Export and save it as "yourkey.reg" Then if you need to restore it you can just go to the directory where you save it and double click the file and it will import it back overwritting what was there.

Now as for the encryption I created an RC4 encrytper using the _stringencrypt() in autoit. You can use _StringEncrypt() . The tool example that is in the helpfile was very confusing and took me time to figure it out howver I ended making my own version which was much easier. PM me if you want me to send it to you.


EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Yes go into the registry using regedit from the run line in windows. go to that key and once you have selected that key, then go to File/Export and save it as "yourkey.reg" Then if you need to restore it you can just go to the directory where you save it and double click the file and it will import it back overwritting what was there.

Now as for the encryption I created an RC4 encrytper using the _stringencrypt() in autoit. You can use _StringEncrypt() . The tool example that is in the helpfile was very confusing and took me time to figure it out howver I ended making my own version which was much easier. PM me if you want me to send it to you.

RC4 encryption using _StringEncrypt() :whistle: ?

RC4

Edit:

Actually, I had re-written Valiks to condense it just to one function...

Func _RC4EncDec($sData, $sKey)
    If $sData = '' Or $sKey = '' Then Return ''
    Local $aState[256], $nKeyLength = StringLen($sKey), $nDataLength = StringLen($sData)
    Local $sMid, $iIndex, $xCC = 0, $yCC = 0, $sResult = '', $sSwap
    For $iCC = 0 To 255
        $aState[$iCC] = $iCC
    Next
    For $iCC = 0 To 255
        $sMid = StringMid($sKey, Mod($iCC, $nKeyLength) + 1, 1)
        $iIndex = Mod(Asc($sMid) + $aState[$iCC] + $iIndex, 256)
        $sSwap = $aState[$iCC]
        $aState[$iCC] = $aState[$iIndex]
        $aState[$iIndex] = $sSwap
    Next
    For $iCC = 1 To $nDataLength
        $xCC = Mod($xCC + 1, 256)
        $yCC = Mod($aState[$xCC] + $yCC, 256)
        $sSwap = $aState[$xCC]
        $aState[$xCC] = $aState[$yCC]
        $aState[$yCC] = $sSwap
        $iIndex = Mod($aState[$xCC] + $aState[$yCC], 256)
        $sMid = BitXOR(Asc(StringMid($sData, $iCC, 1)), $aState[$iIndex])
        $sResult &= Chr($sMid)
    Next
    Return SetError(@error, @extended, $sResult)
EndFunc
Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

Edit:

If you'd like to use it here is the String Encrypter Gui that I created.

StringEncrypt.zipvs update

Edited by EndFunc

EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

If you'd like to use it here is the String Encrypter Gui that I created.

I don't understand, you didn't change _StringEncrypt from what I see in your script... all you do is call it itself:
$EncryptString = _StringEncrypt(1, GUICtrlRead($StringInput), GUICtrlRead($InputPass), Guictrlread($EncryptLevel))

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

I don't understand, you didn't change _StringEncrypt from what I see in your script... all you do is call it itself:

$EncryptString = _StringEncrypt(1, GUICtrlRead($StringInput), GUICtrlRead($InputPass), Guictrlread($EncryptLevel))
Edit: Typo

That's correct. I wasn't trying to changing it. I was only making it easier to do for when I want to encrypt a string for my scripts because I use _StringEncrypt inside of some of my scripts. Do you not use _StringEncrypt() ?

Edited by EndFunc

EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

That's correct. I wasn't string to changing it. I was only making it easier to do for when I want to encrypt a string for my scripts because I use _StringEncrypt inside of some of my scripts. Do you not use _StringEncrypt() ?

No, I use the _RC4 function I posted above that I modded from Valiks.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

No, I use the _RC4 function I posted above that I modded from Valiks.

I'm not quite as skilled as you yet. :whistle: Haven't been doing it that long so I have to use the included _StringEncrypt() function.


EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

I'm not quite as skilled as you yet. :whistle: Haven't been doing it that long so I have to use the included _StringEncrypt() function.

There are no "have" too's. It encrypts like _StringEncrypt does, it's faster, it allows a key phrase to encrypt with... just slimmer IMHO. Doesn't matter how long you've been a member or how skilled you are, passing 2 parameters vs 3 or more is always easier :P .

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

There are no "have" too's. It encrypts like _StringEncrypt does, it's faster, it allows a key phrase to encrypt with... just slimmer IMHO. Doesn't matter how long you've been a member or how skilled you are, passing 2 parameters vs 3 or more is always easier :P .

True but there was HAVE too's before you posted your function. :whistle: thx for the tips.


EndFuncAutoIt is the shiznit. I love it.

Share this post


Link to post
Share on other sites

Thxs guys for all your help I'm really gratefull for that.. I'll give it a try and keep you posted on my advancement.

Cheers

:whistle:

Share this post


Link to post
Share on other sites

One last question, is there a way that you can logout of a session, make the script login on a different session and continu doing the stuuf he needs to do! I'll explain why

Once the computer reboot, I need the script to login on the admin session, rename the profile of the user, then logout of admin, login on the user so Windows recreate a local profile and then copy the stuff from her renamed profile to the new one!

Is there a way to do that?

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0