Foreground Snapins
-
@JJ-Fullmer it wouldn’t solve your issue. SYSTEM can’t interact with desktop sessions on newer windows versions. Its a security concern and is strictly prohibited. No amount of wrappers will circumvent that.
-
@Joe-Schmitt Then I must hack the system! Mwahahahahaha!
-
@JJ-Fullmer Not the best solution, but one work around I had done for a program that I had the same issues with is to schedule a task to install the software. I created a snapin that setup a scheduled task (using SCHTASKS) on the client and then kicked off the task before finishing. This allowed the program to come up in the user session and either be interacted with or in your case run the autoit script. I tried to find that script but I must have deleted it because I can not find it anywhere. But that may give you a starting point to try.
-
@ITSolutions @Tom-Elliott
The msi-wrapper didn’t work in the snapin as @Joe-Scmitt predicted. Because even in the msi wrapper it still just opens up the gui installer and clicks through it. Still a really cool tool though, I’m sure I’ll find a use for it in the future.
I’m going to give the Scheduled tasks idea a go. -
@ITSolutions I don’t suppose you can find the script that you had? I can’t seem to get this to work.
I have tried a variety of things in the snapin for creating and running the scheduled task.
Such asschtasks /Create /TN fas /TR "\\arrowfs3\scripts\Silent-Installers\Accounting\FAS.exe" /SC ONCE /ST 00:00 schtasks /RUN /TN fas
schtasks /Create /TN fas /TR "%~dp0\FAS.exe" /SC ONCE /ST 00:00 /RL HIGHEST /RU %domain%\%username% /RP %password% schtasks /RUN /TN fas
I was able to get the gui to pop up manually running the scheduled task from the command line but it didn’t do the same when run as a snapin. Perhaps it just can’t be done or I’m missing something. I suppose I could make the whole batch script be the scheduled task instead of just the exe version of the autoit script.
-
@JJ-Fullmer Perhaps try the /IT (interactive) switch
-
@JJ-Fullmer I started digging a little further and found my scripts that I used for that and started to remember a few things. I had mixed results with the scheduled task also it worked sometimes, but not always and so I had to come up with a different solution and what I did was created a runonce entry in the reg and an auto login, then rebooted the machine. At the end of the script that ran I logged back off automatically, this is how I was able to consistently get the program to run. I eventually found a different solution for the program I was using and no longer had to use this. Hopefully you can make use of it though
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v LWSoftware /t REG_SZ /d \\10.1.90.2\software$\Software_install.bat /f reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d . reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUsername /t REG_SZ /d Thecontrollerofall reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d supersecret reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_SZ /d 1
Just in case you were wondering this was my scheduled task script, that as I said I got it to work on a couple machines, but very unreliable
C:\Windows\system32>schtasks /create /tn "FOG install" /tr "\\10.1.90.2\software$\Software_Install.bat" /sc once /st 12:00 /f C:\Windows\system32>schtasks /run /tn "fog install" C:\Windows\system32>schtasks /delete /tn "fog install"
-
The autologon idea might work, because most of the time the snapin would be installed right after imaging and I have a autologon for a setupcomplete type script. But I’d prefer a more flexible snapin solution that doesn’t require a restart, because it looks like a lot of the programs we use aren’t very scripting friendly.
@Quazz I tried the /IT switch it still didn’t work when started from the system account sadly.
I’m still experimenting with this. I’m trying to move to a Windows 10 LTSB image with a more snapin provisioning style for all my programs rather than having them all pre-installed in the image.
So I’ll keep playing with it and report back if I happen to find a universal solution that hasn’t been yet suggested.
-
I know this is an old thread, but i am trying to achieve the same as @JJ-Fullmer. Automating post install of reboot restore rx using the snap in.
My environment is Fog 1.3.0. RC8 with smartinstaller. So this is not possible?
-
@kwetiaw The professional version allows for network deployment, they also offer a msi repackager for the professional version. http://support.horizondatasys.com/Knowledgebase/Article/View/97/0/rollback-rx-deployment-guide