Permission denied when installing from Cygwin on Windows 8

1

1

I have several computers that test installing a program that is hosted on a network drive. Due to the nature of my system (which is very complex) the setup file is being executed from Cygwin. So up until now it just started Cygwin and executed the setup:

/cygdrive/z/testinstall/setup.exe

It works perfectly on all flavors of Windows up until Windows 7. Recently I got Windows 8 and Windows Server 2012 but the same trick does not work anymore on these platforms. Now I get "Permission denied" when running the setup from Cygwin. This most certainly has to do with some new security policy in Windows.

I should note that I can run the setup from cmd but the problem is that I have to do it from Cygwin. I should also note that UAC on those machines is deactivated. Any idea on how I can work around the permission issue?

RegedUser00x

Posted 2012-11-09T10:05:32.557

Reputation: 381

1I wonder if UAC is really deactivated, in Windows 8 UAC is not fully deactivated by simply lowering the slider in the appropriate control panel part; a registry key has to be edited too: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System, a DWORD named EnableLUA has to be set to 0. But not that you'll lose access to Metro styled applications. – Xandy – 2012-11-09T12:49:06.277

Answers

2

You need admin rights to run this file in Windows 7 or Windows 8

runas /user:REQUIREDUSERNAME /savecred c:\PATH\TO\APP.exe

You could run as admin using the above replacing REQUIREDUSERNAME with admin account name.

/savecred will make it ask for admin password on the first run only.

For more information, see the complete documentation of runas command.

swapyonubuntu

Posted 2012-11-09T10:05:32.557

Reputation: 732