开发者

Changing the working directory for a process remotely

开发者 https://www.devze.com 2022-12-25 13:56 出处:网络
I\'ve got an application that has a bug right now, but we\'re unable to update the end-user to get the fix out. What a possible workaround would be is to change the working directory to the applicatio

I've got an application that has a bug right now, but we're unable to update the end-user to get the fix out. What a possible workaround would be is to change the working directory to the application's install directory, but from what I can tell, there's no way to do that outside of the program itself. Is there some sort of Windows API call that can change other processes' working directories, or is that not available due to security issues? I figure it's not possible开发者_开发知识库.


You can change the directory that it initially starts in with a shortcut. If that is not enough, I don't believe what you want is possible without injecting a custom dll into the process after the fact.


Why do you want to change the working directory? Maybe you could modify the PATH environment variable in some way to change the order of directories your app searches for files.

0

精彩评论

暂无评论...
验证码 换一张
取 消