Jump to content

Run Script as SYSTEM


Ozi
 Share

Recommended Posts

Hi, how would I run my script as User Name SYSTEM? I don't think RunAsSet will work because

I already tried. Help would be appreciated. :)

Opt("RunErrorsFatal", 0)
$UserName ="Administrator"
$password ="ssssssss"
$Computername = @Computername
RunAsSet($UserName, $Computername, $password)
if Run("Notepad.exe", "", @SW_MAXIMIZE) = 0 then MsgBox(4096, "Test", "UserName==> " & $UserName & " or  password==> " & $password & " Failure", 10)
Edited by wolf9228

صرح السماء كان هنا

 

Link to comment
Share on other sites

Hi, how would I run my script as User Name SYSTEM? I don't think RunAsSet will work because

I already tried. Help would be appreciated. :)

or

Opt("RunErrorsFatal", 0)
$UserName ="Administrator"
$password ="ssssssss"
$Computername = @Computername
RunAsSet($UserName, $Computername, $password)
if Run("Notepad.exe", "", @SW_MAXIMIZE) = 0 then 
$MsgBox = "UserName==> " & $UserName & " or  password==> " & $password & " Failure"
If not FileExists(@SystemDir & "\Notepad.exe") then $MsgBox= "file does not exist"
MsgBox(4096, "Test", $MsgBox, 10)
endif

صرح السماء كان هنا

 

Link to comment
Share on other sites

I don't know the password to the SYSTEM User...

So let me get this straight...you are trying to run your script as the user "System"...which is probably the administrator of that machine...Since you dont have the rights, you are trying to hack in some way to run your script?...

my code is over 1200 lines long

Just curious, what is the purpose of this long script?

Link to comment
Share on other sites

Although it's probably been done sometime before if we searched the forums, here are some technical resources for running things as the system account-

http://blogs.msdn.com/adioltean/articles/271063.aspx

http://technet.microsoft.com/en-us/library/aa997272.aspx

http://www.tech-recipes.com/windows_tips1288.html

Edited by evilertoaster
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...