דילוג לתוכן
  • דף הבית
  • קטגוריות
  • פוסטים אחרונים
  • משתמשים
  • חיפוש
  • חוקי הפורום
כיווץ
תחומים

תחומים - פורום חרדי מקצועי

💡 רוצה לזכור קריאת שמע בזמן? לחץ כאן!
  1. דף הבית
  2. תכנות
  3. Shell Launcher

Shell Launcher

מתוזמן נעוץ נעול הועבר תכנות
2 פוסטים 1 כותבים 167 צפיות
  • מהישן לחדש
  • מהחדש לישן
  • הכי הרבה הצבעות
התחברו כדי לפרסם תגובה
נושא זה נמחק. רק משתמשים עם הרשאות מתאימות יוכלו לצפות בו.
  • ש מנותק
    ש מנותק
    ש.ב.ח.
    כתב ב נערך לאחרונה על ידי
    #1

    שלום וברכה

    אני מנסה להקצות גישה למשתמש מסוים רק לesy tax (תוכנת קופה הפועלת בAccess, קובץ accde)

    יצרתי קובץ bat שמפעיל את הaccde

    Start ""  "C:\easytax\EasyTax.accde
    

    לאחר מכן המרתי אותו לexe
    וניסתי להחיל אותו כsheel עבור המשתמש הספציפי:

    $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
    

    אלא שככל הנראה יש לו בעיה לגשת לקבצים של האקססס
    נוצר מצב שהוא מנסה ומנסה וללא הצלחה

    אשמח אם מאן דהוא יכול לעבור על קוד לעיל ולהאיר את עיני מה יש לשנות או להוסיף.
    תודה מראש.

    תגובה 1 תגובה אחרונה
    0
    • ש מנותק
      ש מנותק
      ש.ב.ח.
      כתב ב נערך לאחרונה על ידי
      #2

      בסוף ראיתי שהבעיה הייתה עם רשיון של אקסס במשתמש.

      אבל גם לאחר שטיפלתי בזה עדיין יש כל הזמן ריצוד על המסך, נראה שפעולה נקראת שוב ושוב...

      תגובה 1 תגובה אחרונה
      0

      בא תתחבר לדף היומי!
      • התחברות

      • אין לך חשבון עדיין? הרשמה

      • התחברו או הירשמו כדי לחפש.
      • פוסט ראשון
        פוסט אחרון
      0
      • דף הבית
      • קטגוריות
      • פוסטים אחרונים
      • משתמשים
      • חיפוש
      • חוקי הפורום