You are here

What am I doing wrong?

4 posts / 0 new
Last post
Paul_pss
Offline
Last seen: 8 months 9 hours ago
Joined: 2020-08-01 14:39
What am I doing wrong?

I want to make a very simple app called Nettime 3.20 alfa (https://www.timesynctool.com). During the installation the program only copies its files to the standard Program Files (x86) folder and (after changing anything in its config in the program itself) adds this configuration to "HKLM\SOFTWARE\WOW6432Node\Subjective Software\NetTime" section. I do not install its service, so nothing else happens.

1. The path to the exe is E:\NetTimePortable\App\NetTime\NetTime.exe
2. E:\NetTimePortable\App\AppInfo\Launcher\NetTimePortable.ini content is as follows (DirectoryMoveOK=yes and SupportsUNC=yes are not that needed here, I know). E:\NetTimePortable\Data\Settings\nettimemain.reg, of course, it the appropriate format and in the appropriate directory:

[Launch]
ProgramExecutable=NetTime\NetTime.exe
RunAsAdmin=force
DirectoryMoveOK=yes
SupportsUNC=yes

[Activate]
Registry=true

[RegistryKeys]
nettimemain=HKLM\SOFTWARE\WOW6432Node\Subjective Software\NetTime

3. E:\NetTimePortable\App\AppInfo\appinfo.ini content is

[Format]
Type=PortableApps.comFormat
Version=3.7

[Details]
Name=NetTimePortable
AppID=NetTimePortable
BaseAppName=NetTime
Publisher= Pablo & Graham Mainwaring
Category=Utilities
Description=Tool that syncs time
Language=English

[License]
Freeware=true

[Version]
PackageVersion=3.2 a3
DisplayVersion=3.2 alfa3

[Control]
Icons=1
Start=NetTimePortable.exe
BaseAppID=%BASELAUNCHERPATH%\App\NetTime\NetTime.exe

4. I run the latest PortableApps.comLauncherGenerator and make a portable app. I run NetTimePortable and the app starts. But it does not add anything into registry so it runs with the default settings (it writes into the registry if I change anything in the config in the app though).

5. I thought that the problem is with that registry key HKLM\SOFTWARE\WOW6432Node\Subjective Software\NetTime as one needs administrative rights to change it and and RunAsAdmin=force or and RunAsAdmin=compile-force do not work properly. I ran the app with the admin rights (my account is admin). No result

6. Finally. I decided to see if the NetTime portable can write anything into registry. Just for the sake of experimentation I changed the registry section into HKCU\SOFTWARE\Subjective Software\NetTime or even HKCU\SOFTWARE\NetTime. No results.

What can be wrong?

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 28 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Recompile

If you set it to compile-force and then recompile the launcher, it will ask for the appropriate rights. Yes, you need admin rights at the app's level to write to HKLM. An app won't use HKCU if it is written to use HKLM.

Sometimes, the impossible can become possible, if you're awesome!

Paul_pss
Offline
Last seen: 8 months 9 hours ago
Joined: 2020-08-01 14:39
Thanks for your reply.

Thanks for your reply.

1. Yes. of course I have the admin rights and I give these rights when app requires it. But it does not write to HKLM
2. As to HKCU, what I mean is that I decided to test if it will write to HKCU at all. I did change the path in the reg file which was supposed to be imported. What I mean to say is that after compiling the launcher it writes nothing to the registry. Regardless of where I try to write the values to (of course, I recompile the launcher after changing the path in the reg and launcher.ini=NetTimePortable.ini file.)

John T. Haller
John T. Haller's picture
Offline
Last seen: 2 hours 28 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Ditch WOW6432Node

Ditch WOW6432Node\ from your entries. It's part of Windows' translation layer for 32-bit to 64-bit and doesn't need to be specified.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments