psexec

How to run executable from PHP website as a specific Windows user?

余生颓废 提交于 2019-12-09 03:41:27
问题 By default PHP runs under IUSR account. When executed directly: $lastline = exec('D:\\MyProgram.exe', $output, $return_var); It runs, but the program is unable to do it's tasks due to insufficient privileges. My question is: How do I run an executable under a specific Windows account from a PHP website? I've tried: When executed through Sysinternals PsExec: $lastline = exec('D:\\PsExec.exe -u UserName -p Password -accepteula "D:\\MyProgram.exe"', $output, $return_var); MyProgram.exe does not

Powershell - Copying File to Remote Host and Executing Install exe using WMI

佐手、 提交于 2019-12-08 08:12:41
问题 EDITED: Here is my code now. The install file does copy to the remote host. However, the WMI portion does not install the .exe file, and no errors are returned. Perhaps this is a syntax error with WMI? Is there a way to just run the installer silently with PsExec? Thanks again for all the help sorry for the confusion: #declare params param ( [string]$finalCountdownPath = "", [string]$slashes = "\\", [string]$pathOnRemoteHost = "c:\temp\", [string]$targetJavaComputer = "", [string]$compname =

PSEXEC redirect output to local file

a 夏天 提交于 2019-12-08 05:57:55
问题 I need the correct way to accomplish this via a vbscript. This works fine from command prompt: psexec \\99.99.99.99 -u username -p password cmd.exe /c ver > output.txt From the vbscript: sTempFile = objFSO.GetTempName sCmd = "psexec \\" & sIP & " -u " & sDomain & "\" & sUser & " -p " & sPassword & " cmd /c ver > " & sTempFile WSHShell.Run sCmd, 1, True I always get a runtime error: File not found Thanks, Sam 回答1: Dont know why but adding cmd /c also before psexec did the trick. 回答2: Use the

can't start notepad on remote machine using psexec

落花浮王杯 提交于 2019-12-08 02:29:14
问题 I need execute some script in remote computer, I try to start notepad. I use psexec, this command psexec -e -i 1 \\localhost -u domain\user -p password cmd /c notepad.exe successfully opens notepad on my local machine, but doesn't do it on remote. I can't see any error, output is the same as I see after executing on local machine: PsExec v2.0 - Execute processes remotely Copyright (C) 2001-2013 Mark Russinovich Sysinternals - www.sysinternals.com What could be a reason I can't execute notepad

Using PSEXEC returns no output from the remote task

落爺英雄遲暮 提交于 2019-12-07 00:21:54
问题 I am using psexec to run an exe on a server. The command runs ok, but there is no output on my local console. This is the command I am using: psexec.exe \\my-machine ping localhost which results in: PsExec v1.94 - Execute processes remotely Copyright (C) 2001-2008 Mark Russinovich Sysinternals - www.sysinternals.com ping exited with error code 0. if I try to run this localy however, it works fine psexec.exe \\localhost ping localhost PsExec v1.94 - Execute processes remotely Copyright (C)

PSEXEC - “The Handle is invalid” When running the command as System User

白昼怎懂夜的黑 提交于 2019-12-06 18:29:58
问题 This is the command that works fine if run from a user-spawned command prompt: PSEXEC \\xxx.xxx.xxx.xxx -u xxxx -p xxxx -accepteula cmd /c "TYPE C:\Pyxislog\PYXIS01.log|Find/i "%ID%"" >nul However, if I try to run this from a system-invoked cmd prompt I get this: Couldn't access 10.219.149.65: The handle is invalid. Connecting to 10.219.149.65... It has to run as a system user, since it will be deployed via a remote software tool which runs as a system user. Is this a limitation of psexec?

PSEXEC redirect output to local file

拜拜、爱过 提交于 2019-12-06 16:44:34
I need the correct way to accomplish this via a vbscript. This works fine from command prompt: psexec \\99.99.99.99 -u username -p password cmd.exe /c ver > output.txt From the vbscript: sTempFile = objFSO.GetTempName sCmd = "psexec \\" & sIP & " -u " & sDomain & "\" & sUser & " -p " & sPassword & " cmd /c ver > " & sTempFile WSHShell.Run sCmd, 1, True I always get a runtime error: File not found Thanks, Sam Dont know why but adding cmd /c also before psexec did the trick. Use the syntax below : cmd /c ver 2>output.txt and you are done! If you want to append the output file cmd /c ver 2>

Powershell - Copying File to Remote Host and Executing Install exe using WMI

五迷三道 提交于 2019-12-06 16:05:10
EDITED: Here is my code now. The install file does copy to the remote host. However, the WMI portion does not install the .exe file, and no errors are returned. Perhaps this is a syntax error with WMI? Is there a way to just run the installer silently with PsExec? Thanks again for all the help sorry for the confusion: #declare params param ( [string]$finalCountdownPath = "", [string]$slashes = "\\", [string]$pathOnRemoteHost = "c:\temp\", [string]$targetJavaComputer = "", [string]$compname = "", [string]$tempPathTarget = "\C$\temp\" ) # user enters target host/computer $targetJavaComputer =

can't start notepad on remote machine using psexec

做~自己de王妃 提交于 2019-12-06 11:56:19
I need execute some script in remote computer, I try to start notepad. I use psexec, this command psexec -e -i 1 \\localhost -u domain\user -p password cmd /c notepad.exe successfully opens notepad on my local machine, but doesn't do it on remote. I can't see any error, output is the same as I see after executing on local machine: PsExec v2.0 - Execute processes remotely Copyright (C) 2001-2013 Mark Russinovich Sysinternals - www.sysinternals.com What could be a reason I can't execute notepad successfully on remote machine? To start notepad on remote machine using psexec: psexec \

How do I edit text remotely in Windows

非 Y 不嫁゛ 提交于 2019-12-06 02:31:31
问题 (Note, this question is also posted on technet) How can I remotely edit a text file in Windows? I am running and administering a number of Windows 7 workstations and Windows Server 2012 machines. I would like to be able to remotely edit text files on any of these machines. I can connect to any of these machines via psexec or powershell remoting. I can also connect via rdp, but for the workstations I would rather not kick the user off unless I absolutely have to. For example, we manage state