Comments (13)
Line 45 - 73 in Updater - > Program.cs
var startInfo = new ProcessStartInfo
{
WorkingDirectory = updateeDirPath
};
// If updatee is an .exe file - start it directly
if (string.Equals(Path.GetExtension(updateeFilePath), ".exe", StringComparison.OrdinalIgnoreCase))
{
startInfo.FileName = updateeFilePath;
}
// If not - figure out what to do with it
else
{
// If there's an .exe file with same name - start it instead
// Security vulnerability?
if (File.Exists(Path.ChangeExtension(updateeFilePath, ".exe")))
{
startInfo.FileName = Path.ChangeExtension(updateeFilePath, ".exe");
}
// Otherwise - start the updatee using dotnet SDK
else
{
startInfo.FileName = "dotnet";
startInfo.Arguments = updateeFilePath;
}
}
using (var restartedUpdateeProcess = Process.Start(updateeFilePath))
WriteLog($"Restarted as pid:{restartedUpdateeProcess?.Id}.");
You start the process there without using startInfo you created before.
Change
Process.Start(updateeFilePath)
to
Process.Start(startInfo)
And it works :)
from onova.
Otherwise it works very well even on Linux. Just had to remove the "Onova works only on Windows warning", make it target .Net Standard 2.0
and change a little bit to make restarting work there too 💯 . Very nice and simple updater.
from onova.
Hi, are you using Onova 2.4.4?
from onova.
yes
from onova.
It should work in 2.4.4
Can you post your latest log file from %localappdata%/Onova/{Your app name}/Log.txt?
from onova.
18-Aug-2019 02:54:11.764> Onova Updater v2.4.4.0 started with args: [C:\Users\HendrikMennen\source\repos\VHDP\VHDPlus\bin\Debug\netcoreapp2.1\VHDPlus.dll, C:\Users\HendrikMennen\AppData\Local\Onova\VHDPlus\0.3, True].
18-Aug-2019 02:54:11.770> Waiting for all running updatee instances to exit...
18-Aug-2019 02:54:11.977> Copying package contents from storage to updatee's directory...
18-Aug-2019 02:54:14.373> Restarting updatee...
18-Aug-2019 02:54:14.438> System.ComponentModel.Win32Exception (0x80004005): Der angegebenen Datei ist keine Anwendung zugeordnet
bei System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
bei System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
bei Onova.Updater.Program.Update(String updateeFilePath, String packageContentDirPath, Boolean restartUpdatee)
bei Onova.Updater.Program.Main(String[] args)
The path of the DLL is correct
Der angegebenen Datei ist keine Anwendung zugeordnet = There is no application associated with the specified file
from onova.
@Sewer56 have you checked, does it break for you as well?
from onova.
If I try to do open the application with dotnet C:\Users\HendrikMennen\source\repos\VHDP\VHDPlus\bin\Debug\netcoreapp2.1\VHDPlus.dll
it works fine
Was that your question?
from onova.
I guess it could be the same problem as this guy has:
dotnet/core#1857
from onova.
I was asking someone else who also had issues with .NET Core 3.0 app.
That issue doesn't seem related. I'll look into it next week.
from onova.
Above is the correct solution.
I was about to check this myself, moving back from my fork temporarily but seems I was beat to it.
from onova.
Excuse me while I knock myself out with a facepalm. That's what you get for not testing.
from onova.
You can submit your changes as a pull request ;)
from onova.
Related Issues (20)
- Use Onova with dotnet core application HOT 5
- "Delayed" restart HOT 4
- Wrong updatee path in wpf .net core 3.0 HOT 5
- Allow extract and copy content without zip root directory HOT 3
- Not working with /p:PublishSingleFile=true apps HOT 54
- Add the ability to specify custom arguments for app restart HOT 1
- Updater reuses the same hidden console window with the updatee when it restarts HOT 7
- GithubPackageResolver: if "name" is null or empty or whitespace resolve "tag_name" instead HOT 3
- Does not Update on Windows Store App (WAP Dist) - APPXBUNDLE (.appxbundle) HOT 7
- Any plan to update to the nuget package? HOT 1
- Implement a publisher HOT 7
- Support for private GitHub repos HOT 7
- Is there way multi version update? HOT 1
- Updater dont work after the last update HOT 3
- My Onova-related projects generate too many system*.dlls in the bin directory HOT 5
- Provide an indicator telling whether it's the first time the user runs the app since last update HOT 1
- Provide a way to install required .NET runtime along with the autoupdate HOT 1
- Onova.Updater doesn't run on fresh installation of Windows 7 HOT 1
- Back up files before overwriting HOT 2
- Version 2.6.8 does not work HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onova.