Quantcast
Channel: Sysinternals Forums
Viewing all articles
Browse latest Browse all 10386

PsTools : psexec to run a mp4 on remote computer

$
0
0
Author: saikoutenshi
Subject: psexec to run a mp4 on remote computer
Posted: 13 January 2014 at 8:38pm

I'm trying to prank my colleague who is constantly messing with peoples computers at work. Basically, i have scripts that will work when playing a sound file, using sndrec32.exe

I want to be able to play a .mp4 file using windows media player, but i am having issues. Here's my code so far:

if not exist \\REMOTECOMPUTER\c$\windows\nircmd.exe xcopy "C:\Windows\System32\nircmd.exe" \\REMOTECOMPUTER\c$\windows /D /y
if not exist \\REMOTECOMPUTER\c$\windows\sndrec32.exe xcopy "C:\Windows\System32\sndrec32.exe" \\REMOTECOMPUTER\c$\windows /D /y

xcopy C:\Windows\Media \\REMOTECOMPUTER\c$\windows\media /D /y

psexec \\REMOTECOMPUTER c:\windows\nircmd mutesysvolume 0
psexec \\REMOTECOMPUTER c:\windows\nircmd setsysvolume 65535

psexec \\REMOTECOMPUTER "C:\Program Files\Windows Media Player\wmplayer.exe" /play /close /fullscreen c:\windows\media\WhatIsLove.mp4


Essentially, whats supposed to happen is:

1. looks for nircmd.exe file on remote computer, if it doesnt exist then copy it.
2. looks for sndrec32.exe file on remote computer, if it doesnt exist then copy it. (used to play sound files.)
3. copies the folder contents of C:\Windows\media on my machine to the remote machine. (this includes whatislove.mp4 file)
4. Unmutes system volume of remote computer and maxes out the volume.
5. ATTEMPTS to play file.


Fails at step 5.
If i use:
psexec \\REMOTECOMPUTER "c:\windows\sndrec32.exe" /play /close c:\windows\media\notify.wav

it will work, but not when using windows media player. it returns with this:

C:\Program Files\Windows Media Player\wmplayer.exe exited on REMOTECOMPUTER with error code 0.


Any ideas why this works with sndrec32.exe and not wmplayer.exe?


Viewing all articles
Browse latest Browse all 10386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>