Babycat
Member
- Local time
- Today, 22:53
- Joined
- Mar 31, 2020
- Messages
- 281
Hi all
I have a VBS file to run Access app. My Access app writes few values to registry under HKEY_LOCAL_MACHINE, thus it is required to run with Admin privilege.
My PC has only one account: Admin, no passwword and i am using this account. However I still have to use argument "runas" as below code. This make me a bit confused...
Here is my VBS code:
And, the true problem is: When running with "runas" (admin privilege), I can't type unicode characters for my local language (Vietnamese) in any controls of Access.
It does not happen when i use argument "open", meaning I can type Vietnamese language into controls but now my Access app can not write to HKEY_LOCAL_MACHINE registry.
ChatGPT hints me about the enviroment variable things, the input language may be changed when I use "runas"...
I am still strugglling in this mess and no solution yet.
Is there any one experienced with this problem?
Or any suggestion please.
Thank you
I have a VBS file to run Access app. My Access app writes few values to registry under HKEY_LOCAL_MACHINE, thus it is required to run with Admin privilege.
My PC has only one account: Admin, no passwword and i am using this account. However I still have to use argument "runas" as below code. This make me a bit confused...
Here is my VBS code:
Code:
' Run the command with ShellExecute
objShellA.ShellExecute """" & accessApp & """" , """" & FEPath & """", "", "runas", 1
' objShellA.ShellExecute """" & accessApp & """" , """" & FEPath & """", "", "open", 1
And, the true problem is: When running with "runas" (admin privilege), I can't type unicode characters for my local language (Vietnamese) in any controls of Access.
It does not happen when i use argument "open", meaning I can type Vietnamese language into controls but now my Access app can not write to HKEY_LOCAL_MACHINE registry.
ChatGPT hints me about the enviroment variable things, the input language may be changed when I use "runas"...
I am still strugglling in this mess and no solution yet.
Is there any one experienced with this problem?
Or any suggestion please.
Thank you
Last edited: