Jump to content

runas


Recommended Posts

I have code that i would use runasset() to change the profile that a program will run under, i also had used shellexecute() to execute some things inside this code

but now with runas() there is no runasset()

does anybody know of a way to get shellexecute() to be run with different user settings/ ie username and password in the newest version (3.12)

Any help is appreciated

maybe we should suggest shellexecuteas()!

func get_quote()
   local $quote 
   switch random(1, 3, 1)
    case 1
     $quote = '"' & "A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, " & _
       "design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give " & _
       "orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, " & _
       "fight efficiently, die gallantly. Specialization is for insects." & '"' & " Robert A. Heinlein"
    case 2
     $quote =  '"' & "Within each of us lies the power of our consent to health and sickness, to riches and poverty, to freedom " & _
       "and to slavery. It is we who control these, and not another." & '"' & " Richard Bach (Illusions)"
    case 3
     $quote ='"' & "Don't handicap your children by making their lives easy." & '"' & " Robert A. Heinlein"
   EndSwitch
   MsgBox(0, "Quote for the moment", $quote & @CRLF)
EndFunc

get_quote()
Link to comment
Share on other sites

  • 2 weeks later...

Anybody have any ideas on this?

i use ShellExecute("rundll32.exe", "shell32.dll, OpenAs_RunDLL " & $filename)

with runasset() in the older version. but they have now removed it and use

runas(). maybe a way to implement shellexecute() into the runas() or any other tips would be greatly appreciated.

thanks

func get_quote()
   local $quote 
   switch random(1, 3, 1)
    case 1
     $quote = '"' & "A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, " & _
       "design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give " & _
       "orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, " & _
       "fight efficiently, die gallantly. Specialization is for insects." & '"' & " Robert A. Heinlein"
    case 2
     $quote =  '"' & "Within each of us lies the power of our consent to health and sickness, to riches and poverty, to freedom " & _
       "and to slavery. It is we who control these, and not another." & '"' & " Richard Bach (Illusions)"
    case 3
     $quote ='"' & "Don't handicap your children by making their lives easy." & '"' & " Robert A. Heinlein"
   EndSwitch
   MsgBox(0, "Quote for the moment", $quote & @CRLF)
EndFunc

get_quote()
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...