Running Install As System Account (for SCCM )

Got a problem you cannot solve? Try here.
Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Running Install As System Account (for SCCM )

Postby Sheri_Steeves » Wed Apr 27, 2016 1:20 pm

Hello,

I am working on resolving an issue one of my clients has with my InstallAware install when they tried to push the install via SCCM as the System account. They need to use the System account as their users do not have permissions to install software. The client is installing the software silently.

We can test this scenario using SysInternals PSTools utility PSExec.exe to run a cmd.exe prompt as the System account and run the install from that cmd prompt.

My first problem was the Destination dialog in the Aero theme using a Shell control. This was resolved by removing the shell control and using a Browse button similar to the Official dialog scheme. This seemed to work until I rebuild the install and got strange error message dialogs.

This one is very short but I have had some that list a whole lot more:
SystemAccount_ErrorMessage.PNG
SystemAccount_ErrorMessage.PNG (9.76 KiB) Viewed 9476 times


This is a longer one, and I had one where the entire dialog box was a jumble of unicode\Chinese characters.
SystemAccount_LongErrorMessage.png
SystemAccount_LongErrorMessage.png (73.67 KiB) Viewed 9476 times


I started to troubleshoot and when I call the following system calls I get unreliable results; I don't know yet if I'll find others. Note that the square brackets around the SHORTCUTFILES value are put there by me.

Get Folder Location System->Desktop Directory into DESKTOPDIR
Get Folder Location Start Menu->Programs Group into SHORTCUTFILES


A Message box displayed after I get all these variables in my code shows the following:
SystemAccount_DebugMessageAfter.PNG
SystemAccount_DebugMessageAfter.PNG (19.38 KiB) Viewed 9476 times



What do I need to do to get the proper results returned when installing under the System account?

Thanks,

Sheri

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Running Install As System Account (for SCCM )

Postby FrancescoT » Wed Apr 27, 2016 2:11 pm

Dear Sheri,

for what I see I have the feeling that you are not using the following calls correctly.
Get Folder Location System->Desktop Directory into DESKTOPDIR
Get Folder Location Start Menu->Programs Group into SHORTCUTFILES


You should instead use the following code within the "[DEFINE REGION: Define Setup Globals]

Code: Select all

Get Common Folder Location Start Menu->Programs Group into SHORTCUTFILESALL
Get Folder Location Start Menu->Programs Group into SHORTCUTFILES
if Variable SHORTCUTFILESALL Equals
  Set Variable SHORTCUTFILESALL to $SHORTCUTFILES$
end

Code: Select all

~InstallAware Clipboard Data~
~End~
~{6DAEAD64-291F-4F50-B785-24183AE4C13C}~
~Set Variable~
~{119910BC-578B-4336-8DE8-849B6D729A37}~
~SHORTCUTFILESALL~
~$SHORTCUTFILES$~
~If~
~{E345F547-A7F3-492C-B4F5-CFCC2527921D}~
~SHORTCUTFILESALL~
~0~
~~
~FALSE~
~Get Folder Location~
~{5DF4B313-B2D8-4434-B0BC-10B84C75CE34}~
~SHORTCUTFILES~
~14~
~FALSE~
~Get Folder Location~
~{1D65F69F-9188-47F0-951C-E2B97E6B7D63}~
~SHORTCUTFILESALL~
~14~
~TRUE~

Then just before the Install process begins;

Code: Select all

if Variable ALLUSERS Equals TRUE
  Set Variable SHORTCUTFOLDER to $SHORTCUTFILESALL$\$STARTMENU$
  Get Common Folder Location System->Desktop Directory into DESKTOPDIR
else
  Set Variable SHORTCUTFOLDER to $SHORTCUTFILES$\$STARTMENU$
  Get Folder Location System->Desktop Directory into DESKTOPDIR
end

Code: Select all

~InstallAware Clipboard Data~
~End~
~{D3E728CA-2945-4AD2-8BAE-4C3F78B56D86}~
~Get Folder Location~
~{FC0675C9-8D69-4AF5-835D-32AEBB6BA167}~
~DESKTOPDIR~
~17~
~FALSE~
~Set Variable~
~{A462046F-9274-4025-A406-0C6B1A503975}~
~SHORTCUTFOLDER~
~$SHORTCUTFILES$\$STARTMENU$~
~Else~
~{782C9E00-FB73-40A6-8E5C-94C7DD9A8D5E}~
~Get Folder Location~
~{3E0A1CD1-64CD-4404-8015-125FE0E67B1E}~
~DESKTOPDIR~
~17~
~TRUE~
~Set Variable~
~{582DC97F-33E9-4B5B-B8A1-2B2F5DB010AB}~
~SHORTCUTFOLDER$MYAH$MYAH$FALSE~
~$SHORTCUTFILESALL$\$STARTMENU$~
~If~
~{ED9089CB-C5C8-425F-908A-EC38E615CA54}~
~ALLUSERS~
~0~
~TRUE~
~FALSE~

This because under system account the installation must be executed as PER-MACHNE (ALLUSERS=TRUE) and consequently, the "StartMenu->Programs" and "System->Desktop Directory" folders have to be the location of the pre-defined folder that is shared by all users of the target system.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: Running Install As System Account (for SCCM )

Postby Sheri_Steeves » Wed Apr 27, 2016 2:25 pm

Francesco,

That does help as it confirms the fix I just found as being the correct one.

As usual, I figure out my problem AFTER I post to the forum. :)

Sheri

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Running Install As System Account (for SCCM )

Postby FrancescoT » Wed Apr 27, 2016 2:26 pm

:D :D :D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

gsRon
Posts: 26
Joined: Sun Sep 14, 2008 10:21 pm

Re: Running Install As System Account (for SCCM )

Postby gsRon » Mon May 02, 2016 6:32 pm

Sheri_Steeves wrote:Francesco,

That does help as it confirms the fix I just found as being the correct one.

As usual, I figure out my problem AFTER I post to the forum. :)

Sheri


Sheri,

What was your work around?

The one i found was to comment out the 'Display Dialog: destination ...' line, but this is not acceptable.

Ron.

Sheri_Steeves
Posts: 124
Joined: Mon Oct 22, 2012 2:14 pm

Re: Running Install As System Account (for SCCM )

Postby Sheri_Steeves » Tue Sep 06, 2016 1:06 pm

I am so sorry - I actually JUST saw this notification today.

My issue was the actual dialog theme I was using - Aero. The Location dialog where I choose the install location uses a "shell control" showing an Explorer-like tree view for selecting folders. My older installs (which used Official dialog theme) just used an edit field and a Browse button. I had to modify the Aero dialog to use a Browse button like my older installs.

What was happening was that the shell control cannot be initialised as under the System account as there is no "access to Desktop"; this caused the install to fail.


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 61 guests