<?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[Shell Launcher]]></title><description><![CDATA[<p dir="auto">שלום וברכה</p>
<p dir="auto">אני מנסה להקצות גישה למשתמש מסוים רק לesy tax (תוכנת קופה הפועלת בAccess, קובץ accde)</p>
<p dir="auto">יצרתי קובץ bat שמפעיל את הaccde</p>
<pre><code>Start ""  "C:\easytax\EasyTax.accde
</code></pre>
<p dir="auto">לאחר מכן המרתי אותו לexe<br />
וניסתי להחיל אותו כsheel עבור המשתמש הספציפי:</p>
<pre><code>$COMPUTER = "localhost"
$NAMESPACE = "root\standardcimv2\embedded"

# Create a handle to the class instance so we can call the static methods.
$ShellLauncherClass = [wmiclass]"\\$COMPUTER\${NAMESPACE}:WESL_UserSetting"


# This well-known security identifier (SID) corresponds to the BUILTIN\Administrators group.

$Admins_SID = "S-1-5-32-544"

# Create a function to retrieve the SID for a user account on a machine.

function Get-UsernameSID($AccountName) {

    $NTUserObject = New-Object System.Security.Principal.NTAccount($AccountName)
    $NTUserSID = $NTUserObject.Translate([System.Security.Principal.SecurityIdentifier])

    return $NTUserSID.Value

}

# Get the SID for a user account named "Cashier". Rename "Cashier" to an existing account on your system to test this script.

$Cashier_SID = Get-UsernameSID("Cashier")

# Define actions to take when the shell program exits.

$restart_shell = 0
$restart_device = 1
$shutdown_device = 2

# Examples. You can change these examples to use the program that you want to use as the shell.

# This example sets the command prompt as the default shell, and restarts the device if the command prompt is closed. 

$ShellLauncherClass.SetDefaultShell("cmd.exe", $restart_device)

# Display the default shell to verify that it was added correctly.

$DefaultShellObject = $ShellLauncherClass.GetDefaultShell()

"`nDefault Shell is set to " + $DefaultShellObject.Shell + " and the default action is set to " + $DefaultShellObject.defaultaction

# Set Internet Explorer as the shell for "Cashier", and restart the machine if Internet Explorer is closed.

$ShellLauncherClass.SetCustomShell($Cashier_SID, "c:\program files\internet explorer\iexplore.exe www.microsoft.com", ($null), ($null), $restart_shell)

# Set Explorer as the shell for administrators.

$ShellLauncherClass.SetCustomShell($Admins_SID, "explorer.exe")

# View all the custom shells defined.

"`nCurrent settings for custom shells:"
Get-WmiObject -namespace $NAMESPACE -computer $COMPUTER -class WESL_UserSetting | Select Sid, Shell, DefaultAction

# Enable Shell Launcher

$ShellLauncherClass.SetEnabled($TRUE)

$IsShellLauncherEnabled = $ShellLauncherClass.IsEnabled()

"`nEnabled is set to " + $IsShellLauncherEnabled.Enabled
</code></pre>
<p dir="auto">אלא שככל הנראה יש לו בעיה לגשת לקבצים של האקססס<br />
נוצר מצב שהוא מנסה ומנסה וללא הצלחה</p>
<p dir="auto">אשמח אם מאן דהוא יכול לעבור על קוד לעיל ולהאיר את עיני מה יש לשנות או להוסיף.<br />
תודה מראש.</p>
]]></description><link>https://tchumim.com/topic/16170/shell-launcher</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 02:22:33 GMT</lastBuildDate><atom:link href="https://tchumim.com/topic/16170.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 14 Mar 2024 11:10:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Shell Launcher on Thu, 14 Mar 2024 11:37:28 GMT]]></title><description><![CDATA[<p dir="auto">בסוף ראיתי שהבעיה הייתה עם רשיון של אקסס במשתמש.</p>
<p dir="auto">אבל גם לאחר שטיפלתי בזה עדיין יש כל הזמן ריצוד על המסך, נראה שפעולה נקראת שוב ושוב...</p>
]]></description><link>https://tchumim.com/post/161478</link><guid isPermaLink="true">https://tchumim.com/post/161478</guid><dc:creator><![CDATA[ש.ב.ח.]]></dc:creator><pubDate>Thu, 14 Mar 2024 11:37:28 GMT</pubDate></item></channel></rss>