Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Nov 9 '12 at 12:45

This question came from our site for professional and enthusiast programmers.

1  
I 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 Nov 9 '12 at 12:49
    
Hi, that solved the problem. Thanks a lot! –  RegedUser00x Nov 9 '12 at 13:23
add comment

1 Answer

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.

share|improve this answer
    
Thanks for helping. It was the UAC. –  RegedUser00x Nov 9 '12 at 13:23
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.