Tripredacus Posted August 20, 2012 Share Posted August 20, 2012 I am working on automating a program to run from a network drive, but I am having problems getting it to run. This program has a .sys file that it uses for something, it is a filter driver. If I run the program from a c:\test with that file in there, it works fine. Due to the sensitive nature of this program, I'd rather have it run from the network drive so that it won't accidently be left on a completed system. In previous efforts I've accomplished this by copying support files to either the script directory, or into SysWoW64/System32. Unfortunately, this program does not use search paths to find the file. In my testing:- ProcMon does not show the EXE looking for the .SYS file.- Depends does not show the .SYS file in the list.- PE Explorer shows that it looks for the .SYS in the same folder as the .EXE is located.So I am wondering if there is a way to configure Windows temporarily using Symbolic Links or an Environment variable or something else to help this EXE find its support file?A worst case scenario is that I'll just copy it to the HDD temporarily to run the program, but I'd rather not take this step if I don't have to.OS using here is Windows 8 Pro x64 which hopefully won't matter. Link to comment Share on other sites More sharing options...
allen2 Posted August 20, 2012 Share Posted August 20, 2012 So I am wondering if there is a way to configure Windows temporarily using Symbolic Links or an Environment variable or something else to help this EXE find its support file?You can use the path variable (it should support unc name or mapped network drive).A simple batch launching your exe should work after modifying the path variable should work. Link to comment Share on other sites More sharing options...
bphlpt Posted August 21, 2012 Share Posted August 21, 2012 I believe the "normal" behavior of an app is to look in the same folder as the EXE, and if not found there to then look in all the locations defined in the PATH, in order. So I agree with allen2 that modifying the path variable should work. Afterwards, you should be able to then edit the PATH and remove that location in a clean up step.Cheers and Regards Link to comment Share on other sites More sharing options...
Tripredacus Posted August 21, 2012 Author Share Posted August 21, 2012 (edited) I believe the "normal" behavior of an app is to look in the same folder as the EXE, and if not found there to then look in all the locations defined in the PATH, in order. You are right, this is the normal behaviour, but this app isn't doing that. Normally if I run into this situation, I use ProcMon to show me where it is looking for the file, but since it doesn't show up (even with Advanced Output enabled) I can't just temporarily copy it there.I haven't been successful at creating a Path Variable yet, but I have some other things to try out.Update: I've determined that the PATH variable won't make a difference because the .EXE is not using that to find the file. Even if I put the .sys file in the dirs already specified in PATH, it won't run. Edited August 21, 2012 by Tripredacus Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now