Jump to content

Unable to run program in user context with PSEXEC


Recommended Posts

When I run a program in remote vm virtualbix machine windows 7 64 bit with psexec from my current machine.
 
It is working fine in system context.
C:\Users\kirud01>"C:\Software\application packaging\PsTools\PsExec.exe" -s -i -d "\\erwin-pc" -c -f "C:\Build\delete.exe"
 
But when I run the same in user context i.e., without -s parameter.
The screen is getting freezed in the remote machine.
0V6RFa.png
Could you please help me on this.
If possible any alternatives for PSEXEC in AutoIT code itself.
Link to post
Share on other sites
  • Moderators

@ur if your question is solely how  to get PSExec to work in your VM, perhaps the SysInternals forum would be a better place to post. Regarding "any alternatives for PSEXEC in AutoIT (sic)" there is of course RunAs but as to what you can do remotely, without you explaining what exactly you're trying to do remotely it is a bit difficult to offer suggestions.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites
43 minutes ago, JLogan3o13 said:

@ur if your question is solely how  to get PSExec to work in your VM, perhaps the SysInternals forum would be a better place to post. Regarding "any alternatives for PSEXEC in AutoIT (sic)" there is of course RunAs but as to what you can do remotely, without you explaining what exactly you're trying to do remotely it is a bit difficult to offer suggestions.

I am trying to copy an executable from my machine to the remote machine(any location) and execute there with the user credentials provided by us.

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By tarretarretarre
      Version 2.x.x and 3.x.x has been moved to branch 3.x
      About Autoit-Socket-IO
      Autoit-Socket-IO is a event driven TCP/IP wrapper heavily inspired from Socket.IO with focus on user friendliness and long term sustainability.
      I constantly want to make this UDF faster and better, so if you have any suggestions or questions (beginner and advanced) Do not hesitate to ask them, I will gladly help!
      Key features
      Simple API 99% data-type serialization thanks to Autoit-Serialize Can easily be extended with your own functionality thanks to Autoit-Events "Educational" examples Data encryption thanks to _<Crypt.au3> Limitations
      Speed. This UDF will sacrifice some speed for convenience Read more in the official thread
    • By 31290
      Hi everyone, 
      Hope you are doing fine by the time being :/
      Well, seems that I'm running into an issue while trying to add an Active domain security group to a remote computer that has a space in it.
      I've been searching for quite a while now and seems that my search did not get well. 

      The ideal solution for me would be to use Psexec.exe as I can run it with my admin credentials whereas using WMIServices, I don't know how to launch that with these credentials.
      Here's what I wrote so far:
      $sADGroupName as a space in it and there's nothing I can do about, we have to respect a naming convention but it would be "Admins REMOTEMACHINENAME"
      Func f_AddADGroup2localAdmin() SplashTextOn("", "Adding " & $sADGroupName & " to the Local Administrators Group.", 1000, 100, -1, -1, 33, -1, -1, 700) $sCommand = $sResources & 'PsExec -accepteula \\' & $sServName & ' net localgroup Administrators MYDOMAIN\"' & $sADGroupName & '" /add' RunAsWait($sTechGID, "MYDOMAIN", $sTechPWD, 4, $sCommand, @SW_SHOW) SplashOff() ; f_MoveADObject() End Func What is weird is when I output the $sCommand variable, the space is in here but it seems not to be passed in my psexec command when I run it.
      Another thing I saw is that 4 times out of 10, psexec does not even launch.
      So I was also wondering if there could be another way to add the "spaced" group with my admin credentials on a remote server other than psexec.
      Thanks all in advance for the lights you may provide to me and keep safe!
      -31290-
       
       
       
       
    • By Raywando
      Hello,
      This is my first post. So I’ve worked on a script for a while and I’m planning to publish it but the problem is that it connects to an FTP server at some point, and as you probably know FTP credentials are easily captured by a MITM attack or Wireshark (not sure if Wireshark does). So I thought if i can detect data capturing in the user’s network the script would stop. Any idea?.
      If there’s another workaround I’m happy to hear it. 
    • By WoodGrain
      Hi guys,
       
      I've written a script that will move my mouse to a location on the screen whenever my remote access software becomes active, the problem I have is that as soon as the remote access software becomes active it appears to capture the mouse and keyboard so nothing happens when I use MouseMove().
       
      Is there any way around this?
       
      Thanks!
    • By bmy007ro
      I have this psexec command working fine 
      Local $sMachine = InputBox("Input PC name", "Enter Computer Name")
      psexec \\$sMachine -u $sDomain\$sUserName -p $sPassword  \\NetworkFLD\FILENAME.cmd > C:\Temp\TT\My.log
       
      I wanted to converted to AutoIT script
      Cloud you help, please !?
       
×
×
  • Create New...