• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Sign in to follow this  
Followers 0
Tripredacus

Link program to external file

4 posts in this topic

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.

0

Share this post


Link to post
Share on other sites
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.

0

Share this post


Link to post
Share on other sites

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

0

Share this post


Link to post
Share on other sites

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 by Tripredacus
0

Share this post


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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.