ajtruckle 发表于 2021-1-29 14:12:43

使用Manusoft系统在ZWCAD中自动加载.Net DLL时出现问题

我有一个. Net DLL,我想用ZWCAD 2021自动加载。
我按照说明设置了Inno安装脚本。
# define myapp basename " cuttoolszcad . dll "
# define MyAppPublisherKey " TruckleSoft "
[文件]
来源:" cuttoolszcad . dll ";DestDir:“{ app }”;flags:ignoreportion
Source:" cuttoolszcad . cuix ";DestDir:“{ app }”;flags:ignore version
Source:" LSP load \ LSP load。zrx . 2021 . zrx ";DestDir:“{ app }”;DestName:{ # myapp basename } . zrx . 2021 . zrx;flags:ignore version;Check: IsAvailable('ZRX ',' 2021 ',' x86 ');after install:SetupDemandload(' ZRX ',' 2021 ',' x86 ')
Source:" LSP load \ LSP load。zrx . 2021 . x64 . zrx ";DestDir:“{ app }”;DestName:{ # MyAppBaseName } . zrx . 2021 . x64 . zrx;flags:ignore version;Check: IsAvailable('ZRX ',' 2021 ',' x64 ');after install:SetupDemandload(' ZRX ',' 2021 ',' x64 ')
[注册表]
根:HKLM;子项:Software \ { # myapp publisher key } \ { # myapp basename };标志:uninsdeletekeyifemptycheck:IsAdminLoggedOn()
Root:HKCU;子项:Software \ { # myapp publisher key } \ { # myapp basename };标志:uninsdeletekeyifemptycheck:not IsAdminLoggedOn()
Root:HKLM;子项:Software \ { # myapp publisher key } \ { # myapp basename };ValueType:字符串;value name:InstallPath;value data:{ app };标志:uninsteletekeyiftempty uninsteletevalue;check:IsAdminLoggedOn()
Root:HKCU;子项:Software \ { # myapp publisher key } \ { # myapp basename };ValueType:字符串;value name:InstallPath;value data:{ app };标志:uninsteletekeyiftempty uninsteletevalue;Check: not IsAdminLoggedOn()
我有其余的代码部分等。根据样品。当我使用这个系统时,我有两个问题。
1。它正在创建以下注册表项:
" Loader " = " C:\ \ Users \ \ ajtru \ \ AppData \ \ Roaming \ \ CutTools for ZWCad \ cuttoolszcad . dll . zrx . 2021 . x64 . zrx "
它实际上需要创建此注册表项:
" Loader " = " C:\ \ Users \ \ ajtru \ \ AppData \ \ Roaming \ \ CutTools for ZWCad \ cuttoolszcad . dll "
2 .我必须手动添加以下注册表项:
"Managed"=dword:00000001
如何修复安装程序才能使其正常工作?
谢谢。
**** Hidden Message *****

ajtruckle 发表于 2021-1-29 14:26:50

以为我整理了它。
我像这样更改了此代码:
// ----------------------------------------------------------------------------
// PopulateDemandloadKey
// - 为应用程序填充单个需求加载注册表项。
----------------------------------------------------------------------------
procedure PopulateDemandloadKey(const RootKey: Integer; const AppsKey: String; const Loader: String);
begin
RegWriteDWordValue(RootKey, AppsKey + '\{#MyAppBaseName}', 'LoadCtrls', 2); //2 = load at startup
RegWriteStringValue(RootKey, AppsKey + '\{#MyAppBaseName}', 'Description', '{#MyAppName}');
RegWriteStringValue(RootKey, AppsKey + '\{#MyAppBaseName}', 'Loader', ExpandConstant('{app}') + '\' + Loader);
RegWriteDWordValue(RootKey, AppsKey + '\{#MyAppBaseName}', 'Managed', 1); //1 = .net DLL
end;
然后进一步沿着脚本,我剥离了ZRX...stuff:
'2021' :
case Arch of
'x86':
if RegQueryStringValue(HKCU32, 'Software\ZWSOFT\ZWCAD\2021', 'CurVer', ProductKey) then
populateDemandloadKey(GetPreferredRoot32(), ('Software\ZWSOFT\ZWCAD\2021\' + ProductKey + '\Applications'), '{#MyAppBaseName}');
         'x64':
if RegQueryStringValue(HKCU64, 'Software\ZWSOFT\ZWCAD\2021', 'CurVer', ProductKey) then
PopulateDemandloadKey(GetPreferredRoot64(), ('Software\ZWSOFT\ZWCAD\2021\' + ProductKey + '\Applications'), '{#MyAppBaseName}');
         结束;
现在它创建了我的正确密钥,当我启动ZWCAD时,它可以工作并自动加载它。

ajtruckle 发表于 2021-1-29 14:27:49

现在的问题是,为什么zrx方法不是w

ajtruckle 发表于 2021-1-29 14:30:00

我认为我所做的是正确的,因为这里写着:
https://knowledge . Autodesk . com/support/AutoCAD/trouble shooting/caas/sfdc articles/sfdc articles/How-to-autoload-dll-with-AutoCAD . html
页: [1]
查看完整版本: 使用Manusoft系统在ZWCAD中自动加载.Net DLL时出现问题