Install snapin packs with elevated command prompt.



  • I’ve created a simple bat file to remove applications from our PC’s. The problem that I’m running in to is that the bat file needs to be ran in an elevated command prompt. Is there any way to deploy a snapin with an elevated command prompt?



  • @YG2018 no need for a snapin pack if your snapin only consists on a batch file, just create a normal snapin from bat (cmd), if your below post is a paste of the contents of your bat file then your are missing a space " " ;)

    @YG2018 said in Install snapin packs with elevated command prompt.:

    Bat file (uninstall.bat) —> MsiExec.exe /X{A1E58BXX-ECXX-XX19-XXEA-B85CA4F1A2XX} /qn /norestart

    It should look like:

    msiexec.exe /x {A1E58BXX-ECXX-XX19-XXEA-B85CA4F1A2XX} /qn /norestart
    

    Regards X23



  • @x23piracy Thanks for getting back to me. It’s possible it could be a path issue as well…
    Bat file (uninstall.bat) —> MsiExec.exe /X{A1E58BXX-ECXX-XX19-XXEA-B85CA4F1A2XX} /qn /norestart
    To upload this file as a snapin, I zipped the file and named the folder uninstall. Then I created a snapin pack with the snapin argument /c “[FOG_SNAPIN_PATH]\uninstall.bat”.
    If you have a better method of uploading the snapin, please share.
    Thanks for all of your help!



  • I am wondering, the snapin should be run under system privilegues and therefore it should have admin rights.

    Could it be possible that you just habe a path problem, how does your batch look like, can you paste it?

    You can use a bat to exe coverter and set the admin manifest, system should it let be run then under admin rights.


Log in to reply
 

577
Online

5.8k
Users

13.1k
Topics

123.2k
Posts