Ok, A little history first.
There has always been a need to start an app the first time by right licking on the desktop short cut and then selecting "Run as administrator" then once the app opened try and save one report to at least a pdf in order to get Alpha to ask you if you want to install the printer. Once that was all done then you could start the Alpha App normally.
This has always been a total pain in the butt trying to get my end users to read the readmeveryimportant.txt file I include and then actually do it.
Then along comes Windows 10 that can throw a Error Code 30 when trying to print of save to PDF. This is a ACL permissions problem that has been discussed before on the forum and the resolve was to manually edit the registry and set the permissions for the AlphaFivePrinter.
As a result I have spent more time then I care to count giving support for just these two issues.
For the permission issue, you can use REGINI from a command line but my installer had issues passing the parameters to it so I went a different way. I can share how to use regini from a command line if someone really wants to know.
I chose instead to use SetACL for this. It is available for free and comes in a 32bit and 64bit version that are both included in the download zip file. It is also available for developers who want to include a dll and com in their exe files.
Now what I am going to show here I have working in an install package I create with Actual Installer. I am also packaging the Alpha5 version 11 runtime in the install package. The reason I am mentioning the A5 version is the AlphaFivePrinter is called AlphaFivePrinterV4p5 in version 11 so the registry entries must match the name for the printer version.
Ok now for the how-to..
Start the registry editor on your dev machine. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\Software. You should see and entery for the AlphaFivePrinterV4p5
Right click on "AlphaFivePrinterV4p5" and then select Export. Give the file a name you can remember.
We are going to use this to install the Alpha Five Printer without making your end users running the app or runtime as administrator.
In the Actual Installer project, under System/Registry select the "Import" and navigate to the file you saved from the registry export.
This will let the installer install the AlphaFivePrinter into the registry on your end users computer.
Now we must take care of that pesky error code 30 and make sure it never shows up. To do this I used SetACL. SetACL.exe comes in two versions. One for 32bit systems and one for 64bit systems. On the install disk (I am using flash drives to ship my app) I created two folders. SetACL32 and SetACL64 and placed the appropriate version of SetACL.exe in each one. You could also just have them installed in folders where you install the runtime.
On the System/Commands tab in Actual Installer
This is the setting for the 32bit. The 64bit is the same except for the File Directory and the "Launch on OS:" settings.
The full parameter passed to SetACL.exe is
I also have the installer register all the ocx and dll files needed by Alpha.
With this setup it installs my app and the A5V11 runtime, installs the AmyuniV4 printer and the AlphaFivePrinterV4p5. Gives the needed Security permissions to "Everyone" for the AlphaFivePrinterV4p5 printer and does not require that Alpha ever be "Run as Administrator".
I am going to also create an exe file that wil just reinstall the AlphaFivePrinterV4p5 printer and set the permissions as these seem to get screwed up if someone upgrades to Windows 10 from a lower Windows version.
You can get SetACL from https://helgeklein.com/download/
Hope this helps anyone who has had these issues.
If you want to know how to set the permissions using REGINI, let me know and I will try and post the basics.
There has always been a need to start an app the first time by right licking on the desktop short cut and then selecting "Run as administrator" then once the app opened try and save one report to at least a pdf in order to get Alpha to ask you if you want to install the printer. Once that was all done then you could start the Alpha App normally.
This has always been a total pain in the butt trying to get my end users to read the readmeveryimportant.txt file I include and then actually do it.
Then along comes Windows 10 that can throw a Error Code 30 when trying to print of save to PDF. This is a ACL permissions problem that has been discussed before on the forum and the resolve was to manually edit the registry and set the permissions for the AlphaFivePrinter.
As a result I have spent more time then I care to count giving support for just these two issues.
For the permission issue, you can use REGINI from a command line but my installer had issues passing the parameters to it so I went a different way. I can share how to use regini from a command line if someone really wants to know.
I chose instead to use SetACL for this. It is available for free and comes in a 32bit and 64bit version that are both included in the download zip file. It is also available for developers who want to include a dll and com in their exe files.
Now what I am going to show here I have working in an install package I create with Actual Installer. I am also packaging the Alpha5 version 11 runtime in the install package. The reason I am mentioning the A5 version is the AlphaFivePrinter is called AlphaFivePrinterV4p5 in version 11 so the registry entries must match the name for the printer version.
Ok now for the how-to..
Start the registry editor on your dev machine. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\Software. You should see and entery for the AlphaFivePrinterV4p5
Right click on "AlphaFivePrinterV4p5" and then select Export. Give the file a name you can remember.
We are going to use this to install the Alpha Five Printer without making your end users running the app or runtime as administrator.
In the Actual Installer project, under System/Registry select the "Import" and navigate to the file you saved from the registry export.
This will let the installer install the AlphaFivePrinter into the registry on your end users computer.
Now we must take care of that pesky error code 30 and make sure it never shows up. To do this I used SetACL. SetACL.exe comes in two versions. One for 32bit systems and one for 64bit systems. On the install disk (I am using flash drives to ship my app) I created two folders. SetACL32 and SetACL64 and placed the appropriate version of SetACL.exe in each one. You could also just have them installed in folders where you install the runtime.
On the System/Commands tab in Actual Installer
This is the setting for the 32bit. The 64bit is the same except for the File Directory and the "Launch on OS:" settings.
The full parameter passed to SetACL.exe is
Code:
-on "hklm\SYSTEM\CurrentControlSet\Hardware Profiles\Current\Software\AlphaFivePrinterV4p5" -ot reg -actn ace -ace "n:Everyone;p:full"
With this setup it installs my app and the A5V11 runtime, installs the AmyuniV4 printer and the AlphaFivePrinterV4p5. Gives the needed Security permissions to "Everyone" for the AlphaFivePrinterV4p5 printer and does not require that Alpha ever be "Run as Administrator".
I am going to also create an exe file that wil just reinstall the AlphaFivePrinterV4p5 printer and set the permissions as these seem to get screwed up if someone upgrades to Windows 10 from a lower Windows version.
You can get SetACL from https://helgeklein.com/download/
Hope this helps anyone who has had these issues.
If you want to know how to set the permissions using REGINI, let me know and I will try and post the basics.
Comment