The task is to run a batch file to register the DLL, everything works on the computer under the administrator. But if you run on another computer under the user writes "Invalid folder name"
Created account specifically for these needs with admin rights
Process pr = new Process(); pr.StartInfo.UseShellExecute = false; pr.StartInfo.FileName = @"C:\Users\" + userName + @"\Documents\DLL2.bat"; pr.StartInfo.Verb = "runas"; pr.StartInfo.UserName = "admin"; pr.StartInfo.Domain = "os"; pr.StartInfo.Password = "password"; pr.Start(); I tried to run and so "C: \ DLL2.bat" - the error is the same.
cmd /c "C:\Users\userName\Documents\DLL2.bat"- the same garbage? And what exactly is written in a batch file? maybe some of the lines of the batch file results in the specified error? - Akina