Few versions ago there was the RusAsSet function that has now disappered... now : how can i do to run a function (not a external program but a autoit function like regwrite) with admin rights ?
I've tried this but it doesn' t work :
$cmd1="RegWrite(" & "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesUSBSTOR" & "," & "start" & "," & "REG_DWORD" & ",0x00000003)"
;MsgBox(4096,"test",$cmd1)
RunAs("Administrateur","********","********",0,$cmd1)
Exit
=> don't forget to change "administrateur" by "administrator" if you are using an english version of XP !
NB : sorry for my bad english, i'm french
Edited by akorx, 03 February 2012 - 02:36 PM.




This topic is locked