Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find the file in the current directory when run elevated mode #10

Open
chkchun opened this issue Oct 4, 2022 · 0 comments
Open

Comments

@chkchun
Copy link

chkchun commented Oct 4, 2022

When we only put filename, and run silentCMD under elevated mode (run as administrator), it cannot find the file.

<setting name="DefaultBatchFilePath" serializeAs="String">
      <value>test.bat</value>
</setting>

I have to change the Environment.CurrentDirectory + filename
become Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + filename.
Then it only able to find the file for both normal mode & elevated mode.

===
This is a great program. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant