Skip to content

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

Description

@chkchun

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions