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.
When we only put filename, and run silentCMD under elevated mode (run as administrator), it cannot find the file.
I have to change the
Environment.CurrentDirectory+ filenamebecome
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.