Jump to content

psexec hickup

BusterX

Hello there,

 

I'm new to psexec and don't fully understand how to use it, but I've managed to gather some info on how to do stuff with it.

 

All my computers use windows 10 ltsc fully updated (about 20) with psexec running smoothly (tested with shutdown and reboot functions)

 

What I want to do with a batch is the following:

Insert computer number, copy one file to remote desktop, execute said file (let's say batch1.bat)

file1.bat is just a short line to open with minimized command another bat file that is stored locally and has one purpose

 

file2.bat is a search for .log files in local username/appdata/programname and copy them to a network location

 

scenario 1: If I psexec start file1.bat, it opens file2.bat but it can not find the files to search for

scenario 2: If I double click file1.bat, it opens file2.bat, copies the files, no problems

 

I have attached the result of both actions and a functionality with some codes, can anyone help me figure out why it can't find the requested files?

comparison.png

functionality.png

Link to comment
Share on other sites

Link to post
Share on other sites

So after digging in more, I've noticed that it's a permissions thing (even though the whole reason i'm doing this multi stage batch execution process was to prevent this thing from happening)

 

I have yet to figure out how to run the designated bat file to be recognized as being opened from that computer

Link to comment
Share on other sites

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

×