Search the Community
Showing results for tags 'psexec'.
Hi all, I'm using PSEXEC to map a drive on a user's machine remotely, amongst running various other CMD commands to amend registry files etc. I am running PSTOOLS on my machine under an admin account, because I cannot use PSTOOLS otherwise. On running the following script, as an example of one of the CMD commands I am trying to run, it runs it as me (as in, an admin). However, I don't want it to do this, as this doesn't map the drive for the user. I want the script to run the CMD command as the currently logged on user, not as me. :MapDrive psexec \\%IP% -s -i -c -f -d cmd.exe /s /c "NET USE X: \\GBUS0042\SMSAPPS$ /persistent:yes" IF ERRORLEVEL 0 ECHO Success! Pause endlocal GOTO Start How would I go about this? I have tried calling a batch file instead, but it still runs the batch file as me (admin) on the user's PC, rather than as them. The idea behind these scripts is to stop me having to remote to every user who simply requires a registy amendment or a drive mapping. Thank you in advance, Haze