I have used the code below for years with no issues and now it does not work. I am using a Windows 10 machine and I am logged in as an administrator. I have tried various things such as using the whole path with WOW6432NODE in it etc. It always reads it, it just doesn't delete it. Any ideas? Oh, yes I have tried with Windows Defender on and off.
// COMPILE_OPTS|C:\Users\Keith Passaur\Desktop\Reset Tiff to Text III.exe|C:\Users\Keith Passaur\Documents\Icons\allsizes2.ico|CONSOLE=0|INCLUDES=1| /LOGFILE=\dev\nul /HIDE /NOSTOPKEY|RUNTIMES=1|BMPS=1
RegistryReadKey>HKEY_LOCAL_MACHINE,SOFTWARE\eDocfile\Tiff to Text III,AppFolder,ProgramFolder
Let>APP_TITLE=Reset Tiff to Text III
//Let>REG_64=0
RegistryReadKey>HKEY_LOCAL_MACHINE,SOFTWARE\eDocFile\Tiff to Text III,itime,installedtime
RegistryDelVal>HKEY_LOCAL_MACHINE,SOFTWARE\eDocFile\Tiff to Text III,itime
RegistryDelKey>HKEY_LOCAL_MACHINE,SOFTWARE\eDocFile\Tiff to Text III,itime
RegistryReadKey>HKEY_LOCAL_MACHINE,SOFTWARE\eDocFile\Tiff to Text III,itime,installedtime
If>installedtime=
MDL>Tiff to Text III has been reset
Else
MDL>The program is still running in Trial mode
Endif
//HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\eDocfile\Tiff to Text III
Registry Values not Deleting
Moderators: Dorian (MJT support), JRL
- CyberCitizen
- Automation Wizard
- Posts: 721
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
Re: Registry Values not Deleting
That is not the case. It extends a trial of software that I sell. Since this code has stopped working and I have gotten no response I have had to rewrite the software so the settings are no longer stored in the registry. This is a bug in Macro Scheduler as the code above has worked for years. I'm sure it has to do with Windows security.
- Marcus Tettmar
- Site Admin
- Posts: 7378
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Registry Values not Deleting
To write to HKEY_LOCAL_MACHINE (or create/delete) a process (ANY process) will require Admin privileges. This has ALWAYS been the case but not usually enforced until Windows Vista came along.
An ordinary process ca READ frlm HKLM but would need admin rights to modify.
The correct placed for an ordinary user level process to store settings is HKEY_CURRENT_USER which you CAN modify without being Admin.
There are some good reasons for storing data in HKEY_LOCAL_MACHINE when your app is being installed. Which is why installers nearly always run as admin (admin rights are also need to write files to the Program Files location).
All the above is as designed by Microsoft. Therefore it is absolutely NOT a Macro Scheduler bug as you state.
An ordinary process ca READ frlm HKLM but would need admin rights to modify.
The correct placed for an ordinary user level process to store settings is HKEY_CURRENT_USER which you CAN modify without being Admin.
There are some good reasons for storing data in HKEY_LOCAL_MACHINE when your app is being installed. Which is why installers nearly always run as admin (admin rights are also need to write files to the Program Files location).
All the above is as designed by Microsoft. Therefore it is absolutely NOT a Macro Scheduler bug as you state.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Registry Values not Deleting
I understand having to be logged in as an admin and I am. I have used those lines for over 10 years all the way back to XP without any issues. They worked on Windows 10 until about a month or so ago. I'm sure it is because of a security setting in Windows, but at the end of the day when logged in with the administrator account they don't work any more.
That being said, yes I can still read the entries but I can't modify them. I can however export a reg entry, modify it, save it on my desktop and execute it and it will work. I don't think this would work if I was logged in as anything other than an administrator.
Anyway, if I am logged in as an administrator, with Windows defender turned off how do I correct this so that it does work.
That being said, yes I can still read the entries but I can't modify them. I can however export a reg entry, modify it, save it on my desktop and execute it and it will work. I don't think this would work if I was logged in as anything other than an administrator.
Anyway, if I am logged in as an administrator, with Windows defender turned off how do I correct this so that it does work.
- Marcus Tettmar
- Site Admin
- Posts: 7378
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Registry Values not Deleting
Being logged in as an admin is not enough, Macro Scheduler, or the .exe, will also have to be run as Admin. Even though you might be logged in as administrator, that doesn't necessarily mean that processes you start will be started with admin privileges.
Right click on Macro Scheduler and select run as admin.
I tested this code on Windows 10:
Without running as admin the key never gets created. If I run as admin everything works - it gets created, and then deleted.
With this code on it's own if you are on 64 bit you need to look in Wow6432Node to verify.
If I add this to the top:
Let>REG_64=1
Then it operates against the regular HKEY_LOCAL_MACHINE node.
Stepping through line by line and hitting refresh (F5) while in RegEdit allows me to see that it all works correctly.
BUT - ONLY IF Macro Scheduler is run as admin.
I'm logged in as an administrator. But it will NOT work unless Macro Scheduler is run as administrator. Since Vista EVEN IF you are the administrator apps are run by default with ordinary level privileges.
Right click on Macro Scheduler and select run as admin.
I tested this code on Windows 10:
Code: Select all
RegistryWriteKey>HKEY_LOCAL_MACHINE,SOFTWARE\eDocFile\Tiff to Text III,itime,hello
RegistryReadKey>HKEY_LOCAL_MACHINE,SOFTWARE\eDocFile\Tiff to Text III,itime,installedtime
RegistryDelVal>HKEY_LOCAL_MACHINE,SOFTWARE\eDocFile\Tiff to Text III,itime
RegistryDelKey>HKEY_LOCAL_MACHINE,SOFTWARE\eDocFile\Tiff to Text III,itime
RegistryReadKey>HKEY_LOCAL_MACHINE,SOFTWARE\eDocFile\Tiff to Text III,itime,installedtime
With this code on it's own if you are on 64 bit you need to look in Wow6432Node to verify.
If I add this to the top:
Let>REG_64=1
Then it operates against the regular HKEY_LOCAL_MACHINE node.
Stepping through line by line and hitting refresh (F5) while in RegEdit allows me to see that it all works correctly.
BUT - ONLY IF Macro Scheduler is run as admin.
I'm logged in as an administrator. But it will NOT work unless Macro Scheduler is run as administrator. Since Vista EVEN IF you are the administrator apps are run by default with ordinary level privileges.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Registry Values not Deleting
I have always run it compiled, so I guess now even though I am logged in as an administrator I have to right click it and select run as an administrator as well.
Or perhaps I could try compiling using the real administrator account instead of being logged in as an administrator.
Or perhaps I could try compiling using the real administrator account instead of being logged in as an administrator.
- Marcus Tettmar
- Site Admin
- Posts: 7378
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Registry Values not Deleting
However you compile it you will need to specifically choose to run it as admin. Unless you completely disable UAC (making Windows insecure). You could set a shortcut to it that tells it to run as admin but then you would still need to confirm the UAC prompt (unless you've disabled UAC).
This really is not new and has been the case since Vista. Only in XP and below did apps adopt the user's privilege level.
This really is not new and has been the case since Vista. Only in XP and below did apps adopt the user's privilege level.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Registry Values not Deleting
I have never had the issue until now. However, I am beginning to think it is may machine. I couldn't get your sample to work stepping through it. I tried it with a real administrator account which has UAC completely disabled and it didn't work.
So I went to reboot and start over and it locked up on "please wait windows is installing updates do not turn off your computer".
So I went to reboot and start over and it locked up on "please wait windows is installing updates do not turn off your computer".