Hello, so I am pulling my hair out at this and im hoping I can get some help. Im writing a little program that allows users to install google chrome on their own machines without us having to go over and put in our admin passwords. The general flow is that I have a .net app which houses the offline chrome installer, and automagically passes it my admin credentials. The .net app is located on a server on our LAN. the code is
I tried just doing "C:\users\public" as the process.start location but I got a similar error, so I figured it was trying to run it from the servers user folder, so I explicitly stated to use the local machine as the directory. The strange thing is, it copies the installer to the folder perfectly, if I go to the public folder on the local machine I can see Chrome.exe, but then it fails at running it. If I take the .net app and copy it locally and run it, the program works perfectly. Any help would be greatly appreciated.
EDIT - The threading.sleep thing is just there to test, I want to make sure the file has enough time to be written before I execute it, which it does.
Code:
Dim cName As String = (System.Environment.MachineName)
File.WriteAllBytes("\\" + cName + "\C$\users\public\" & "Chrome.exe", My.Resources.Chrome)
Dim domain As String = "myDomain"
Dim uName As String = "myUsername"
Dim pass As String = "myPassword"
Dim passString As System.Security.SecureString = New System.Security.SecureString()
For Each c As Char In pass
passString.AppendChar(c)
Next
Threading.Thread.Sleep(10000)
Process.Start("\\" + cName + "\C$\users\public\" & "Chrome.exe", uName, passString, domain)
EDIT - The threading.sleep thing is just there to test, I want to make sure the file has enough time to be written before I execute it, which it does.
Last edited: