Git Product home page Git Product logo

silentclickonce's Introduction

SilentClickOnce

Install/Uninstall ClickOnce without prompting the user

Need to install or uninstall a ClickOnce .application without prompting the user? Maybe you want to manage your application using your DC and you can't because ClickOnce needs the user to press "Install/Uninstall"? SilentClickOnce is what you need.

Microsoft supports installing ClickOnce .application files silently by using a custom installer as noted in the Microsoft Docs. Well, this is just a custom installer ready to use, nothing special.

How can I use it?

Simply compile this, call it from a command line and pipe the output to a file to see what's happening.

Install example: SilentClickOnce.exe -i "\\192.168.1.2\apps\MyApp\MyApp.application" > MyApp.log Uninstall example: SilentClickOnce.exe -u MyApp > MyApp.log

Don't want to compile or can't? Download the release here on GitHub and download the ready to use file.

Why is this special?

This is nothing special. I made this for me to use and made it public because people around the internet keep saying that you can't silently install a ClickOnce. Someone even said that only malware installs silently completely forgetting that maybe you want to push an internal use application to every client in your company domain. If you stumble on someone saying you can't I hope you'll end up here and solve your problem with a quick and simple solution.

For every information check on the Microsoft Docs.

If you don't trust this or you want to make it yourself check the Microsoft Docs, the code is almost the same.

silentclickonce's People

Contributors

paaaulz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

silentclickonce's Issues

Error uninstalling Object reference not set to an instance of an object.

This app works great for installing, but I'm getting the following error when trying to use it to uninstall:
[2023-06-05 18:33:43] [-] Error uninstalling Object reference not set to an instance of an object.

For reference, here is what the uninstall string looks like for this app:
rundll32.exe dfshim.dll,ShArpMaintain MyApp.application, Culture=neutral, PublicKeyToken=31d7c5feac915835, processorArchitecture=msil

I'm working on a company-wide migration this week, and I would sincerely appreciate any help you can provide in resolving the uninstall error. Thanks!

click once VSTO install / uninstall

I am just wondering if this product works for click once VSTO ? I tried and nothing happened. This would be a nice feature. Great work so far . This has saved me on some silent installs through sccm.

Can't uninstall app

Hi, I have successfully used SilentClickOnce to install silently.

However I would like to silently uninstall, but it gives the below error.
So i am running the following command for Tradesignal click once app:
SilentClickOnce.exe -u Tradesignal > Uninstall.log

The log states Error uninstalling Object reference not set to an instance of an object.

When I look at the registry entry for this click once app, its referenced Tradesignal.app and not .application.

Looking at the new uninstall fix code, i can see it referencing {applicationName}.application

Can you help?

Thanks.

Why make it a WinForms App?

Thanks for posting this App! It helps us alot. I was just curios as to why you made it as a WinForms App instead of a console App? The obvious reason, is because a WinForms app is easy to hide :) But I did some digging and found easy ways to also make a Console App not be shown. Thanks again!

Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll

Hi!

I'm trying to deinstall one ClickOnce application.

But got an error...

Here's output from VS:

'SilentClickOnce.exe' (CLR v4.0.30319: SilentClickOnce.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'SilentClickOnce.exe' (CLR v4.0.30319: SilentClickOnce.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'SilentClickOnce.exe' (CLR v4.0.30319: SilentClickOnce.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'SilentClickOnce.exe' (CLR v4.0.30319: SilentClickOnce.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'SilentClickOnce.exe' (CLR v4.0.30319: SilentClickOnce.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'SilentClickOnce.exe' (CLR v4.0.30319: SilentClickOnce.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'SilentClickOnce.exe' (CLR v4.0.30319: SilentClickOnce.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'SilentClickOnce.exe' (CLR v4.0.30319: SilentClickOnce.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Accessibility\v4.0_4.0.0.0__b03f5f7f11d50a3a\Accessibility.dll'.
'SilentClickOnce.exe' (CLR v4.0.30319: SilentClickOnce.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Remoting\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'SilentClickOnce.exe' (CLR v4.0.30319: SilentClickOnce.exe): Loaded 'C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Deployment\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
uninstallString: rundll32.exe dfshim.dll,ShArpMaintain SeaDeviceUpdater.application, Culture=neutral, PublicKeyToken=fa333fcb8fc8126f, processorArchitecture=msil
Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll
[-] Error uninstalling Exception has been thrown by the target of an invocation.
The program '[10372] SilentClickOnce.exe' has exited with code 1 (0x1).

uninstaller just hangs

When you run your program for the uninstall it never knows when the uninstall is complete . The silentclickonce uninstaller is just hanging out in task manager. I can not run anything else until I kill the process. Have you seen this before I can send you the files I am working with.

it also never writes in the log file that it has uninstall or has started the process.

Love the install portion. No issues there.

I am running windows 10

Error verifying manifest: Exception reading manifest when using the install option

Hi Paul.

Its me again. the uninstall parameter worked great in the other post. I am now using the -i parameter and I get this error:
[2023-07-03 10:58:02] [?] Starting setup.
[2023-07-03 10:58:02] [-] Error verifying manifest: Exception reading manifest from file://10.140.68.15/05%20IT/CTDI%20Software/TWC/CTDI%20TWC.appref-ms: the manifest may not be valid or the file could not be opened.

Originally the Clickonce App comes in an compiled Exe file which I already tried and I get same error. Without your tool the app installs fine whatever double clicking the exe or the with the .appref-ms file extension. Both asks the user to install or not to install.

If I use your tool I get the error above. Any ideas? File exists in location. I also tried copying the installer locally in the device and same issue.
Sorry to mess your day.

Error exception thrown when uninstalling

Hi,

When I try to uninstall a application with the following command:

SilentClickOnce.exe -u AppName

...I will get this error and then nothing more happens:

Exception thrown: 'System.Reflection.TargetInvocationException' in mscorlib.dll [2023-06-01 14:48:01] [-] Error uninstalling: Exception has been thrown by the target of an invocation. The program '[5844] SilentClickOnce.exe' has exited with code 1 (0x1).

Do you know what is causing this?

Add Timestamp to Log File

Hi,

would it be possible to add current Date and Time Stamps to the Log Output Lines?
Would be very helpful for us :)

Thanks

Uninstall Parameter

Hi,

installation is working fine, thanks.

But how to uninstall the app? It doesnt work like mentioned.
"SilentClickOnce.exe -u Appname> myappuninst.log"
For uninstall, I dont use the .application file or am i wrong? I've used the Name how it is shown in Apps & Features.
I always get the error "[-] Error uninstalling exception has been thrown by the target of an invocation."

Thanks for help.

Error uninstalling: Exception has been thrown by the target of an invocation.

Hi.

First at all. Good idea on developing this wonderful app. I have an issue on v1.5. I have Windows 11 Pro x64 and a few ClickOnce apps, one named Admin Module.
I use the syntax SilentClickOnce -u "Admin Module" > AdminMod.log
and I get this error

[2023-06-29 10:33:14] [?] PublicKeyToken: 0000000000000000, Culture: neutral, processorArchitecture: x86
[2023-06-29 10:33:14] [-] Error uninstalling: Exception has been thrown by the target of an invocation.

at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at SilentClickOnce.Form1.Uninstall(String applicationName)

I wrote the name in quotes as thats how I found in in my registry and due of the space between the words

image

IF I try AdminModule it says [2023-06-29 10:39:06] [-] Application 'AdminModule' not found in Registry.

Any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.