regisp Posted July 19, 2007 Share Posted July 19, 2007 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 Link to comment Share on other sites More sharing options...
DW1 Posted July 19, 2007 Share Posted July 19, 2007 post your code AutoIt3 Online Help Link to comment Share on other sites More sharing options...
ChrisL Posted July 19, 2007 Share Posted July 19, 2007 (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 July 19, 2007 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
regisp Posted July 19, 2007 Author Share Posted July 19, 2007 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 Link to comment Share on other sites More sharing options...
ChrisL Posted July 19, 2007 Share Posted July 19, 2007 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 [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
pixels75 Posted July 19, 2007 Share Posted July 19, 2007 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 ! Link to comment Share on other sites More sharing options...
regisp Posted July 19, 2007 Author Share Posted July 19, 2007 thanx you, i will try these example in a few hours (its late in france) keep informed Link to comment Share on other sites More sharing options...
pixels75 Posted July 19, 2007 Share Posted July 19, 2007 thanx you, i will try these example in a few hours (its late in france)keep informedYou're welcome.I'm in France too Link to comment Share on other sites More sharing options...
enaiman Posted July 20, 2007 Share Posted July 20, 2007 (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 July 20, 2007 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 :) Link to comment Share on other sites More sharing options...
regisp Posted July 20, 2007 Author Share Posted July 20, 2007 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 Link to comment Share on other sites More sharing options...
mrbond007 Posted July 20, 2007 Share Posted July 20, 2007 run explorer with the /s parameter Projects : Space Regain - Memory Fusion - PWGT - Chip-ITGames : BrainPain - BrainPain Director's Cut - ProSpeed Games Pack (New)Vista vs XP : the forbidden fight Link to comment Share on other sites More sharing options...
regisp Posted July 20, 2007 Author Share Posted July 20, 2007 this may work but step 1 is not accomplished (avois the end of my script when killing explorer.exe) still waiting. Link to comment Share on other sites More sharing options...
regisp Posted July 23, 2007 Author Share Posted July 23, 2007 do someone know the trick to restart explorer.exe after having killed it ? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now