Solved Save Attachment, Unzip RAR And Merge Registry File (1 Viewer)

ahmedjamalaboelez

Ahmed J. Aboelez
Local time
Yesterday, 20:31
Joined
Feb 25, 2015
Messages
79
Good Day Access World ,
In access Arabic Language while using Active X Control not work fine before set PC location to Arab region.
So I Create Access DB which has attached RAR file inside and I used some Search Resources codes to run the following
1 - Save Attachment to Desktop (y)Done
2 - Unzip Saves RAR File :devilish:Code Error
3 - Run Registry File , :unsure: Still I cant Send Key Yes
4 - Restart The Windows (y) Done

So Please Find Attached Access DB File And Help Me In 2 And 3 Requirements

Resources I Find And Used

Save Attached File
Unzip RAR File
Run Registry
Restart PC

Thanks In Advance
A.J
 

Attachments

  • SetRgistryFile.accdb
    740 KB · Views: 89
Last edited:

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 22:31
Joined
Feb 28, 2001
Messages
27,194
So from your discussion, you have two out of four of your goals not working.

1. For the UNZIP you get an error. But what error? If you allow the code to stop and enter debug mode (at least during development), you would see exactly what line didn't work and you would probably get an error message.

2. For the registry, you said it didn't work correctly. But did it issue an error? If so, what error?

In general when you have questions for us to help you, you want to give us a lot of symptoms to match up to the errors you saw. Like error numbers or what it actually did (vs. what it should have done).
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 22:31
Joined
Feb 28, 2001
Messages
27,194
You gave me a "SAD" note - but please understand that you have already said this code plays with a machine's registry and not all of us have the luxury of being able to re-image a machine with a modified registry. Not to ignore the possibility that applications such as an anti-viral or internet security package would stop registry modifications.

Think about what you are asking.
 

ahmedjamalaboelez

Ahmed J. Aboelez
Local time
Yesterday, 20:31
Joined
Feb 25, 2015
Messages
79
You gave me a "SAD" note - but please understand that you have already said this code plays with a machine's registry and not all of us have the luxury of being able to re-image a machine with a modified registry. Not to ignore the possibility that applications such as an anti-viral or internet security package would stop registry modifications.

Think about what you are asking.
Sir, I really understand and I really appreciate that every one is trying to help ,
1 - Save Attachment to Desktop (y)Done
2 - Unzip Saves RAR File :devilish:Code Error
3 - Run Registry File , :unsure: Still I cant Send Key Yes
4 - Restart The Windows (y) Done
I solve issue No2 after hours of search, but I still cant solve No.3 , that's why we ask experts to help us and save our time , I really do my best before create threat , because I want to save your valuable time , and I just did the code , but i need expert to tell me what is the error !!
Thank you Sir
A.J
 

Attachments

  • SetRgistryFile.accdb
    896 KB · Views: 87

isladogs

MVP / VIP
Local time
Today, 04:31
Joined
Jan 14, 2017
Messages
18,239
Being as you haven't supplied the .reg file you are trying to run, its not possible to say for sure what your error is.
I'm guessing you may be trying to write to a hive like HKEY_LOCAL_MACHINE which requires elevated permissions
If so, you need to run Access as an administrator for this to work.

Also it is often easier to write code which writes to the registry direct rather than telling it to merge data from an external .reg file
 

ahmedjamalaboelez

Ahmed J. Aboelez
Local time
Yesterday, 20:31
Joined
Feb 25, 2015
Messages
79
Being as you haven't supplied the .reg file you are trying to run, its not possible to say for sure what your error is.
I'm guessing you may be trying to write to a hive like HKEY_LOCAL_MACHINE which requires elevated permissions
If so, you need to run Access as an administrator for this to work.

Also it is often easier to write code which writes to the registry direct rather than telling it to merge data from an external .reg file
is there is any code could help me to modify those values in registry editor !
Thanks
123.png
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 22:31
Joined
Feb 28, 2001
Messages
27,194
I found this article that might be helpful. Note that some hives are restricted while others are not. The article DOES discuss that issue.

 

isladogs

MVP / VIP
Local time
Today, 04:31
Joined
Jan 14, 2017
Messages
18,239
Unfortunately, the link supplied by @The_Doc_Man only applies to a very limited set of keys and won't work for what you want

The HKCU hive isn't restricted, so elevated privileges aren't needed.

Attached is some of the code I use to read from/write to the registry.
Unzip then import to your project as a new module

Try out some of the examples then adapt to match the keys you require.
Each key will need to be done as a separate VBA command in turn

However, surely all of this should just be done from Windows Settings. I'm not sure I see the point of using VBA for this
 

Attachments

  • modRegistryNEW.zip
    2.7 KB · Views: 97

Users who are viewing this thread

Top Bottom