Sign in to follow this  
Followers 0
regisp

runas.exe and explorer win2k

13 posts in this topic

hello gurus,

after a full day trying to find how to do this trick, i come here and ask for help

1) what i want :

a user with user right is logged on its computer (there is a lot of security)

i need to to log on to the pc without logging off the current user and use admin rights to make some work

2)what i have done

change HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced registry subkey's SeparateProcess REG_DWORD value to 1

kill the explorer process

runas.exe /user:user explorer.exe (i have a vbs script for the password windows)

3)what is wrong ?

when running the au3 script, explorer window doesnt appear.

if i launch the runas command from the taskman, this work

if i launch a cmd from taskman and launch the vbs script for the runas command, this work

everything work fine when launch separately (meaning using the taskman)

hope this is clear for you, if more info are neede dont hesitate to communicate

nb: win2k

thx in advance for all valuable help

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

This launches itself as admin if it is not already

If Not IsAdmin() Then
    RunAsSet('USER', @Computername, 'PASSWORD')
    If @compiled then 
        Run(@ScriptFullPath, @WorkingDir)
    Else
        Run('"' & @AutoItExe & '"' & ' "' & @ScriptFullPath & '"', @WorkingDir)
    EndIf
    
    Exit
EndIf


;Main code goes here
Msgbox(0,"","I'm admin")
Edited by ChrisL

Share this post


Link to post
Share on other sites

hi,

i'm not sure i've explain really well my problem

1) the user x autologon with user rights

2)security scheme is applied (no regedit, no usb storage, no cdrom, no control panel......)

I want to (as an admin) to manage this pc but without logoff

there is a way to do this by killing the explorer process and relaunch it with runas command

manually i start the taskman, find explorer, kill it and then execute via taskman the following "runas.exe /profile /user:admin explorer.exe

after giving the pwd everything is fine

i use this method because it seems to be the only one wich permit to have total control over the pc without logoff the current logged user

i start to try to do it in autoit but i'm always stuck with the the reopen of the explorer (i doesnt launch)

if someone can help i should be grateful

remenber : i only want to launch explorer (all other programs seems to work very well with runas(microsoft) or runasset(autoit)

once again, i relly count on your help

Share this post


Link to post
Share on other sites

The script I posted above launches itself by the logon credentials you supply in the top bit.

If you were to run an executable or edit the registry at the point I put main code goes here it would be executed as the user name and password specified in the RunAsSet('USER', @Computername, 'PASSWORD') section of the script.

Weather this does what you want or not I don't know you'll have to try it

If Not IsAdmin() Then
    RunAsSet('USER', @Computername, 'PASSWORD')
    If @compiled then 
        Run(@ScriptFullPath, @WorkingDir)
    Else
        Run('"' & @AutoItExe & '"' & ' "' & @ScriptFullPath & '"', @WorkingDir)
    EndIf
    
    Exit
EndIf


;Main code goes here

Run("Explorer.exe")
;do whatever else you need to do here as admin

Share this post


Link to post
Share on other sites

The script I posted above launches itself by the logon credentials you supply in the top bit.

If you were to run an executable or edit the registry at the point I put main code goes here it would be executed as the user name and password specified in the RunAsSet('USER', @Computername, 'PASSWORD') section of the script.

Weather this does what you want or not I don't know you'll have to try it

If Not IsAdmin() Then
    RunAsSet('USER', @Computername, 'PASSWORD')
    If @compiled then 
        Run(@ScriptFullPath, @WorkingDir)
    Else
        Run('"' & @AutoItExe & '"' & ' "' & @ScriptFullPath & '"', @WorkingDir)
    EndIf
    
    Exit
EndIf
;Main code goes here

Run("Explorer.exe")
;do whatever else you need to do here as admin
Try

Run(@ComSpec & " /C explorer " & @WorkingDir & ",/separate")

It works for me !

Share this post


Link to post
Share on other sites

thanx you, i will try these example in a few hours (its late in france)

keep informed

Share this post


Link to post
Share on other sites

thanx you, i will try these example in a few hours (its late in france)

keep informed

You're welcome.

I'm in France too :whistle:

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Dude - you made a similar request - http://www.autoitscript.com/forum/index.php?showtopic=49793 in another section and it was closed on the fly.

Thread reported!

... waiting for "click" ...

Edited by enaiman

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

ohohoh

i know now whay this is not working (so logical)

when i launch the script, i'm looking for the explorer process and kill it with pskill.

so my script is killed too

thats why im unable to launch a new explorer.exe with admin rights

is there a trick to bypass this ? (i try with a free software named runassvc but no much luck)

i REALLY need to make this working

counting once again on your skills

Share this post


Link to post
Share on other sites

this may work but step 1 is not accomplished (avois the end of my script when killing explorer.exe)

still waiting.

Share this post


Link to post
Share on other sites

do someone know the trick to restart explorer.exe after having killed it ?

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