Shell as Administrator?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ss112358
    New Member
    • Dec 2007
    • 8

    Shell as Administrator?

    Hey all

    I understand how the Shell feature works, a line like:
    Shell("regedit. exe")

    would start the registry editor. But, would it be possible to run it as administrator, rather than the local user? (I have the administrator password.)

    Thanks!
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    By default SHELL executes as administrator.

    You can also use shell to open any file as follows

    [code=vb]Shell "notepad C:\test.txt", vbNormalFocus[/vb]

    Comment

    Working...