- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Disable UAC
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Is there a better way to disable the UAC? Or can this not be done any more with Win 8.1?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Changed approach by editing registry using bat file (see code below). I use the bat in a prereq. Works great now.
@echo off
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t REG_DWORD /d 0 /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t REG_DWORD /d 0 /f
shutdown /r /t 0
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Of course windows 8.1 has made it more difficult to disable the uac easily. Do I think this is the best way? Not really, but it's still easier than dealing with the calls from customers who didn't follow instructions and now the files can't move.
If there's another way to handle this, I'm all ears.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Even if you can't remove that requirement, you can write a small application to do that copy, and invoke it from your main application with ShellExecute. Either set the manifest on that to require privileges, or use the verb RunAs to elevate the helper. Preferably warn your user that you need their permission to do some first-time initialization before launching the helper. Optionally consider doing all this as part of the installation itself.
You are strongly encouraged to avoid making system-level changes to address a local problem. Because you turn off UAC, it's harder for you to tell if you have inadvertently introduced any other dependencies on full access to the system.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Once the files have been copied then I just execute a SQL Script to attach the databases.
Otherwise the application on startup is going to have to check to see if the database connection is healthy or if it needs to copy the database and prompt the user to restart the app as an administrator for the copy process. This is how my company actually handled the process since introducing SQL Server many years ago until I was hired and made it so that the setup handles attaching databases.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Changed approach by editing registry using bat file (see code below). I use the bat in a prereq. Works great now.
@echo off
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t REG_DWORD /d 0 /f
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies\System" /v "EnableLUA" /t REG_DWORD /d 0 /f
shutdown /r /t 0