Snapin run as a user instead of system



  • I need to install fonts. I need to install devices with unsigned drivers (old printers and such). To do this I need the snappin to run as the logged in user, not as system. System cant install fonts. System cannot click ok for an unsigned driver. All our users use the same Windows user, it would be great if i could do a :runas override so the tech imaging the machine would be there to interface with the snapin.
    You ask, why not just run an msi or bat file after the image as the user? Because I only need certian things on specific machines. Assigning the snapins via fog lets me control what file goes to what machine after image.


  • Moderator

    How about…

    Apply the snapin to everyone,

    Then, in your script, just specify computer names… if the computers name matches such-n-such, install the font.



  • Thanks for the feed back.

    The fonts we have are purchased. We only have licence for X number of machines. Thus Id like to assign the snapin to just those machines that need it. Its a elementary font, like with the dotted lines thru the big letters. Ill try your reg solution, as my vbscript doenst work as a snapin, but does work if launched as a user.

    As for the drivers, we have many many printers that are so old that the drivers are not Msoft signed, so unless the logged in user clicked the box to Ignore and install anyway, then the printer does not get pushed out. Fog does a good job of pushing out our printers that have newer windows signed drivers.

    Its not a severity. I ended up making a script/batch file that runs after a machine is imaged (via the login script) that only runs once and asks a bunch of questions and launches msi’s based on the yes answers. Just would be nice to be able to have fog snapins just for the specific msi’s that a machine needs. Its not critical. I would probably use snapins if i could interact with my workers once they image.

    I understand Fog is free. It IS amazing as it is.

    Thanks again for your input.


  • Senior Developer

    I disagree. [Almost] anything can be done as system if you are creative enough. Fonts should be pretty simple with some registry-know-how. E.G. this should do it (in theory)

    [CODE]@ECHO OFF
    XCOPY <Source>.<ext> %systemroot%\fonts
    REG ADD “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts” /v “<Fontname> (<Type>)” /t REG_SZ /d “<Filename>.<ext>” /f[/CODE]

    Though I must ask, why can you not just install all of your fonts on the image itself?

    As for your runas request that won’t help. SYSTEM is [B]STRICTLY[/B] prohibited from interacting with users accounts [B]IN ANY MANNER[/B]. The clients (legacy & new) use some named pipe hacks to bypass this restriction and form an IPC median (Inter-process-communication). Runas would not give the program a visible gui for the user.

    One possible solution (though this would require user interaction) is to make a little [URL=‘https://www.autoitscript.com/site/autoit/’]AutoIt [/URL]script (compiled as an exe), which your users run. It gives them a gui & they can click on what device they want and it installs it.

    Another possibility is to make a snapin that uses window’s task scheduler to try installing the driver as a specific user when they log in. <-- I would check out this idea

    With that said, there IS a way of running tasks as users and still giving them a gui. The new client has the capability of doing that. However, it is not programmed to do user-level snapins yet. It was on our “Maybe let’s implement this later list”. Depending on the severity of your needs, I [B]could[/B] start working on it now.


Log in to reply
 

411
Online

39002
Users

10717
Topics

101762
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.