In a single sign-on environment, it possible to have one Epicor icon that when clicked will prompt the user for classic or active view? As it is today, we have to use two icons in our SSO environment: one to launch Epicor in Classic view and one to launch Epicor in Active view.
Not to my knowledge. We had two icons for a while. We then just forced everyone over to the new Active Homepage.
I submitted this to Epicor. Simply put: no. You can’t prompt with SSO is what they told me.
Yeah, didn’t think so. When we had classic before moving everyone over to active in 10.2.300 there wasn’t a way.
A powershell script that displays a dialog with two buttons?
Each button runs a different command line (the target from each of your two icons)
Add-Type -AssemblyName PresentationFramework
$wrkdir = "C:\Epicor\ERP10.2Client_UAT\Client\"
$prog = "C:\Epicor\ERP10.2Client_UAT\Client\Epicor.exe"
$args = " /config=UAT_102300.sysconfig"
$args_classic = " /classic /config=UAT_102300.sysconfig"
$msg = "Yes: Classic mode
No: ModernShell"
## the above need to span two lines if you want the line break
$msgBoxInput = [System.Windows.MessageBox]::Show($msg,"Launch Classic mode?",'YesNoCancel')
switch($msgBoxInput){
'Yes'{
## Launch Classic mode
Start-Process -FilePath $prog -ArgumentList $args_classic -WorkingDirectory $wrkdir
}
'No'{
## Launch Modern mode
Start-Process -FilePath $prog -ArgumentList $args -WorkingDirectory $wrkdir
}
'Cancel'{
## Don't launch either
}
}
Yields:
edit
Make a shortcut to the PS1 file, and then change the shortcut’s target:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\Users\ckrusen\Temp\E10_Mode_Select.ps1"
The part after -File
is what the shortcut’s original target was.
Edit #2
Add -windowstyle hidden
to the shortcut target to suppress the Powershell Window that pops up while the script runs.
Add parameters 'Question', 'No'
to the MessageBox call, to show the question image, and set the default button (the one that fires when you hit enter key) to the No
button.
...Show($msg,"Launch Classic mode?",'YesNoCancel', 'Question', 'No')
for a slightly nicer Prompt that defaults to Modern Shell.