<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Snapin Pack Arguments don&#x27;t work]]></title><description><![CDATA[<p dir="auto">Hi</p>
<h2>My server’s config</h2>
<pre><code>Ubuntu 22.04.5 LTS
You're running the latest stable version: 1.5.10
</code></pre>
<p dir="auto">I’m trying to deploy snapin pack. These are third party zip file. They all have the same packaging format</p>
<pre><code>unzip 7-Zip_25.01-1_x64.zip 
Archive:  7-Zip_25.01-1_x64.zip
  inflating: pre-install.ps1         
  inflating: post-install.ps1        
  inflating: install.bat             
  inflating: winsoft-config.ini      
  inflating: 7z2501-x64.msi          
  inflating: 7z2501-x64.exe
</code></pre>
<p dir="auto">The deployment entry point is always the  <code>install.bat</code> script.</p>
<h2>What I’m trying to achieve</h2>
<p dir="auto">I want to use either PowerShell (preferred) or batch, in order to launch the  <code>install.bat</code> script <strong>from the <code>"[FOG_SNAPIN_PATH]\7zip\" </code> directory</strong>.<br />
This is very important because if the path is incorrect, the <code>pre-install.ps1</code> and <code>post-install.ps1</code> scripts will not run correctly.</p>
<p dir="auto">My snapin config for 7-zip as an example</p>
<pre><code>Snapin Name: 7zip
Snapin Description: Installation de 7zip
Snapin Type: 	Snapin Pack Template	
Snapin Pack File: cmd.exe
Snapin Pack Arguments: %~dp0 /c "[FOG_SNAPIN_PATH]\7zip\install.bat"
Snapin File (exists): 7-Zip_25.01-1_x64.zip
Snapin Enabled : x
Snapin Arguments Hidden:	
Snapin Timeout (seconds): 0
Replicate?: x
Reboot after install:	
Shutdown after install:	
Snapin Command read-only: cmd.exe %~dp0 /c "[FOG_SNAPIN_PATH]\7zip\install.bat"
</code></pre>
<h2>What I got</h2>
<p dir="auto">In fact, as fog snapin has no debug mode, I have almost no clue to understand the failure. The Fog documentation is quite poor on this subject and is lacking examples.</p>
<p dir="auto">The logs from fog client on the computer</p>
<pre><code>23/09/2025 11:45:56 Client-Info Client Version: 0.13.0
23/09/2025 11:45:56 Client-Info Client OS:      Windows
23/09/2025 11:45:56 Client-Info Server Version: 1.5.10
23/09/2025 11:45:56 Middleware::Response Success
23/09/2025 11:45:56 SnapinClient Running snapin 7zip
23/09/2025 11:45:56 Middleware::Communication Download: http://fog.example.com/fog/service/snapins.file.php?mac=8C:EC:4B:87:8A:4E&amp;taskid=19
23/09/2025 11:45:57 SnapinClient C:\Program Files (x86)\FOG\tmp\7-Zip_25.01-1_x64.zip
23/09/2025 11:45:57 SnapinClient Processing SnapinPack 7-Zip_25.01-1_x64.zip
23/09/2025 11:45:57 SnapinClient Extracting SnapinPack
23/09/2025 11:45:57 Bus Emmiting message on channel: Notification
23/09/2025 11:45:57 SnapinClient Starting snapin
23/09/2025 11:45:57 SnapinClient Snapin finished
23/09/2025 11:45:57 SnapinClient Return Code: 1
23/09/2025 11:45:57 Bus Emmiting message on channel: Notification
23/09/2025 11:45:57 Middleware::Communication URL: http://fog.example.com/fog/service/snapins.checkin.php?taskid=19&amp;exitcode=1&amp;mac=8C:EC:4B:87:8A:4E&amp;newService&amp;json
</code></pre>
<p dir="auto">I’ve tried a lot of <em>Snapin Pack Arguments</em>, either using <em>PowerShell</em> or <em>cmd.exe</em>, none of those installed the package.</p>
<p dir="auto">Doe anybody have clear examples of <em>Snapin Pack Arguments</em> ?</p>
<p dir="auto">Thanks</p>
]]></description><link>http://forums.fogproject.org/topic/17998/snapin-pack-arguments-don-t-work</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 21:24:54 GMT</lastBuildDate><atom:link href="http://forums.fogproject.org/topic/17998.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 23 Sep 2025 11:50:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Snapin Pack Arguments don&#x27;t work on Wed, 24 Sep 2025 16:26:13 GMT]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">In fact, I really want to use those third party package because they do things very well<br />
My snapin configuration are not tied to a specific version of a package, it’s the upstream repo who take care of that</p>
<p dir="auto">But I have found how to install my <code>install.bat</code> file</p>
<p dir="auto">Here is the solution</p>
<pre><code>Snapin Name: 7zip
Snapin Description: Installation de 7zip
Snapin Type: 	Snapin Pack Template
Snapin Pack Template : PowerShell x64 script
Snapin Pack File: "%SYSTEMROOT%\sysnative\windowspowershell\v1.0\powershell.exe" # autofilled
Snapin Pack Arguments: -ExecutionPolicy Bypass Set-Location "$env:ProgramFiles\FOG\tmp\7zip"; &amp; ".\install.bat"
Snapin File (exists): 7-Zip_25.01-1_x64.zip
Snapin Enabled : x
Snapin Arguments Hidden:	
Snapin Timeout (seconds): 0
Replicate?: x
Reboot after install:	
Shutdown after install:	
Snapin Command read-only: "%SYSTEMROOT%\sysnative\windowspowershell\v1.0\powershell.exe" -ExecutionPolicy Bypass Set-Location "$env:ProgramFiles\FOG\tmp\7zip"; &amp; ".\install.bat"  # autofilled
</code></pre>
<p dir="auto">It works like a charm</p>
<p dir="auto">Maybe it should go in FOG documentation as an example</p>
<p dir="auto">The third party repo I mentioned is there <a href="https://gricad-gitlab.univ-grenoble-alpes.fr/legi/soft/trokata/winsoft-main/" target="_blank" rel="noopener noreferrer nofollow ugc">https://gricad-gitlab.univ-grenoble-alpes.fr/legi/soft/trokata/winsoft-main/</a></p>
<p dir="auto">LEGI is a French research lab, and the repo is under MIT Licence. I am not the owner, but it’s a great work. I will explain more about that later.</p>
]]></description><link>http://forums.fogproject.org/post/157305</link><guid isPermaLink="true">http://forums.fogproject.org/post/157305</guid><dc:creator><![CDATA[jlm]]></dc:creator><pubDate>Wed, 24 Sep 2025 16:26:13 GMT</pubDate></item><item><title><![CDATA[Reply to Snapin Pack Arguments don&#x27;t work on Wed, 24 Sep 2025 03:48:42 GMT]]></title><description><![CDATA[<p dir="auto">Hi there,</p>
<p dir="auto">Unsure if this helps, but here is my setup for 7zip. I usually just go straight from the .exe or .msi files.</p>
<p dir="auto"><img src="/assets/uploads/files/1758685571804-77e4dac6-5b21-4640-a6f6-25ecd52464a9-image.png" alt="77e4dac6-5b21-4640-a6f6-25ecd52464a9-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Another example of snapin arguments:<br />
<img src="/assets/uploads/files/1758685618376-b2780d36-5dbd-429b-8fdc-3c71c8919ecb-image.png" alt="b2780d36-5dbd-429b-8fdc-3c71c8919ecb-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I would suggest adding in a loging function in the .bat or .ps1 file, this way you can see exactly what commands fail.</p>
<p dir="auto">Hope this helps!!</p>
]]></description><link>http://forums.fogproject.org/post/157302</link><guid isPermaLink="true">http://forums.fogproject.org/post/157302</guid><dc:creator><![CDATA[Clebboii]]></dc:creator><pubDate>Wed, 24 Sep 2025 03:48:42 GMT</pubDate></item></channel></rss>