go install on windows: "Access is Denied" - windows-8

I am new to programming in Go. I would really like your help regarding one of my problems.
I am required to do go install on a file, the executable of which (in Windows) is created in a folder called GOPATH\bin.
Until now, I typically followed the routine: go install <file>.go ---> <file>.exe.
However, this time it appears that after the execution of <file>.exe, the exe doesn't finish complete executing for a while and I get the following error when I go install again.
C:\Users\Rahul\Desktop\Compilers\src\cs553s2013\mylexer>go install
is_digit.go go install command-line-arguments: open
C:\Users\Rahul\Desktop\Compilers\bin\is_ digit.exe: Access is denied.

See http://grokbase.com/t/gg/golang-nuts/135fyje5d9/go-nuts-go-build-access-is-denied-windows-7x64
Absolutely no idea why, but the above suggestion worked. One must enable the "Application Experience" windows service on Windows 7 to solve this issue.
I had this service disabled, and was seeing a similar strange 2-3 minute time of "Permission Denied" on my project's binary (the binary would also disappear after a refresh via alt+F2 of $GOPATH/bin, from a Windows Explorer view of the $GOPATH/bin where Eclipse + Goclipse was building my binary). I noticed that just after execution, and before the binary finally disappeared, it was changed to be owned by some unknown user (in Explorer, it isn't owned by the compiling user, Administrator, or even SYSTEM).
I can only speculate -- perhaps Windows keeps any .exe on the filesystem, if it has exited without some sort of undocumented 'all-OK' status to the windows kernel, assuming it 'crashed', so the Application Experience service can send it as diagnostic data to Microsoft -- and if that service is disabled, the Application Experience service can't finalize whatever handshake NTFS or Explorer is waiting for to allow the file to be overwritten by subsequent compiles. So the golang .exe sits there, with elevated permissions, with some system/undefined user, un-deleteable by Eclipse, until Explorer does something to mark it as definitely dead.

Related

JetBrains Rider: How to attach to elevated permissions process running locally?

I am using JetBrains Rider on Linux to debug some .NET core services. I have launched Rider without sudo permissions since my code source tree is all under my local user, but yet the installed services are running under root permissions.
Right now I'm in a predicament where in order to attach to the running processes, I have to launch a new Rider instance using sudo, but that then messes up the source code tree. Overall, this is a huge pain.
I would like to be able to attach to the elevated-permission service via an instance of Rider that is launched without sudo. I think the below is the way to do it: Run --> Attach to Remote Process, which brings up the below popup:
However, the problem with this popup is that if I click the arrow on root#localhost:22, then it shows no processes to attach to. Yet, the 4 processes are there that I would like to attach to (in the screenshot, they are 14949-14952). How can I get "no processes to attach to" to list the 4 processes in question? I have seen this done before by another developer, just think I'm missing something. Also, I'm 100% sure I know the root password.

VBA /Visual basic projects/macros issues while compiling

I have so many problems with any of the VBA/VB projects, that I am by now not sure which category these problems falls in. Some of the issues listed below may or may not be interrelated. But any thing that is related to visual basic project is causing me so many problems since 1 year.
I have researched so many time but have not got a solution till date :(.
But this time I could not stand it any more and therefore I am here to post it.
I had Microsoft visual basic 6.0 installed in my system last year. I was able to create some small windows based forms->compile and run as well. However, when I have a project from external resource for supporting VB applications, none of the project were compiling and running through IDE.
So i researched a lot and found the below issues:
Missing references/missing dlls. added references but no use
Tried help got this error: msdn collection does not exist please reinstall msdn
Tried Compiling - got error:
Compile error: cannot find project project or library
Tried adding components : failed by getting error Dlls are not registered.
Error in project loading, found the below error
Then I tried registering the MSCOMCTL.OCX file through regsrv.exe but it gave admin related errors as below
call toDllRegisterServer failed with error code 0x800280c
Even though I have all admin rights and I am logged in as admin for command prompt.
I also had copied the files from syswow64 to system32 or vice versa whichever way it did not work
Somewhere I had googled that we need to unblock the files to register , but these files were not blocked.
Tired, I just left the problem just like that due to other prioritised work.
But again today my colleague gave me an excel sheet which had macros written in it.
These macros do not run, instead it redirects me to Visual Basic for application IDE where the first window i get is Compile error followed by automation error
Again I thought of researching more on to it, and finally found from SO only that we should be registering MSCOMCTL.OCX.
But no matter what I do, I am unable to register any dlls.
Can any one tell me what is causing so much of compile issues , the solution and why I am not able to register any dlls or files?
And by the way, my system is window 7 64 bit and I seem to be only one in the workplace having this problem.
This issue was present even before any updates. The same profile with the same updates are running in my colleague's system. Even though there were no patch updates etc.
Try this:
Open a Command Prompt:
Open START menu, in Search box enter: cmd.exe, a link will shows, BUT doesn't press Enter key, instead RIGHT-CLICK on the link to open context menu, then choose Run as administrator
A Prompt DOS (black) windows will open on C:\Windows\System32 folder.
If your OS is 32 bit then type the below commands:
regsvr32 mscomctl.ocx press Enter
regtlib msdatsrc.tlb press Enter
If your OS is 64 bit, need to navigate to C:\Windows\SysWOW64 folder: Type the command:
CD C:\Windows\SysWOW64
then press Enter key to confirm.
Type the below commands:
regsvr32 mscomctl.ocx press Enter
regtlib msdatsrc.tlb press Enter
Now should working
HTH

Installer created with Wix fails to be installed as system

I have a quite simple installer created with Wix Toolset. My users complaints that they can't deploy this installer as system user. They have to do it as user. However, I have learned that installers can be deployed as system user. Could anyone tell me what I need to do in my wxs file so that they can deploy it as system user?
We typically deploy our MSIs using Microsoft SCCM as SYSTEM. We use PSEXEC to invoke a CMD prompt as SYSTEM to do our dev testing before sending it to SCCM. There are two reasons an installer would fail as SYSTEM:
1) User error: I can't tell you how many times I've seen packages put into SCCM with invalid command line arguments. One of my favorite is quotation marks get turned into Unicode quotation marks via email transmission. Another is logging to a directory that doesn't exist. Another is forgetting to tell the MSI to run silently. It just sits there and hangs. Another awesome one is typing the MSI name wrong. It's especially awesome because they almost give me an SCCM log when I ask for an MSI log. No MSI log means it's not the MSI's fault.
2) Installer design error: Have you tested your silent installs? Do you have any custom actions that make assumptions about the user context / environment? One of my old favorites (not) was InstallShield InstallScript custom actions that would fail due to a poorly designed DCOM interface for talking to the MSI session handle. It's been almost 10 years since that was fixed but I still come across installers now and then. Another example is assuming that the user will have rights to another machine or the internet (SYSTEM typically has neither in a corp environment.)
I'd start with testing as SYSTEM using PSEXEC. Log the install and see what the error is. Otherwise you haven't really given us any details to give a specific answer for.
You should get them to do a verbose log of what happens when they do the install. There are issues sometimes related to user specific locations, for example a file going to the user's personal folder, what does that mean for the system account? Or the install or a custom action may assume that a drive letter mapped for a user is system wide (they're not - they are per user) and that can cause errors. That's what Chris is saying too - the context matters. The system account does not have access to the interactive user's desktop, the network, profile locations that make no sense for a non-interactive account and so on.
I also am a SCCM user and regularly deploy apps through SCCM... This WIX installer also drived me crazy. But Christopher's reaction helped me...
1) If Wix installers get tested using PSexec, they probably work, SCCM, I don't know what it is, but installs keep failing without apparent reason. (but it fails installing as System is true)
Solution: incorporate psexec in your script in SCCM...
add your setup.exe & psexec.exe in your source folder. Use following syntax in your setup script:
copy psexec.exe to your software source location.
%~dp0PsExec.exe -accepteula \127.0.0.1 "%~dp0setup.exe" --quiet
2) #WIX dev team: also try to test with SCCM!
3) if above fails, you can also extend the suggestion with:
add following syntax in your setup script:
c:\windows\system32\net.exe user /add WixHelpInstaller PaSSW0rd
c:\windows\system32\net.exe localgroup administrators WixHelpInstaller /add
%~dp0PsExec.exe -accepteula -u .\WixHelpInstaller -p PaSSW0rd \\127.0.0.1 "%~dp0setup.exe" --quiet
c:\windows\system32\net.exe user WixHelpInstaller /delete

ideaIC-14.0.2.exe IntelliJ Setup Wizard fails without ever displaying

I downloaded the community edition of IntelliJ as ideaIC-14.0.2.exe.
I ran ideaIC-14.0.2.exe with evelated rights on a Windows 7 64 laptop with the 32 bit version of Java 6 installed.
I notice that two copies of ideaIC-14.0.2.exe appears in task explorer when none were previously present.
Both tasks go away without the setup wizard ever appearing5. I saw nothing related in the Event log.
Do you know how I might be able to overcome this issue and install this app?
Disabling the Firewall was previously suggested and tried.Usually, I run every setup program with elevated rights. I was told that I never need Admin rights to install. This time, I added myself to the Admin user group (which you would think shouldn't be possible!) and then ran setup after once again disabling my firewall. And this time, it worked! I suppose it's possible that I did not disable all of the firewall options last time, but I believe I did. If so, elevated rights must have been insufficient. I forgot to try unchecking the Unblock property on the file-that was a good suggestion, though.

Adding software setup to installer

I'm writing an installer for an application. Most of the installer is done and working, but I have on more step outstanding. I need some way to add a setup window to the installer, that will take user input like server address and port, etc. and write these to the relevant files for system start-up. This preferably done through a GUI of sorts inside the installer.
I've tried creating an executable file that runs after installation, but this does not always execute on different systems.
Is there a way to add a GUI to the installer itself that executes after the directory structures and files have been put into place?
Thanks in advance.
In general you should seriously consider doing this as a standalone app that runs when the app first runs and needs configuring. Then it's a program that runs in a user context and can be tested and debugged in the normal way. At least consider what the user is going to do if they want to change the server address or the port - will they need to uninstall your app and reinstall it just to change the server details or the port?
The GUI may not run correctly when started from the install for a number of reasons. It may be initiated with the system account if it's a deferred CA. It wasn't started from the interactive user shell, so it probably won't have any idea of a working directory. It's being run from an msiexec.exe process running in the system directory and maybe with a system account - that's not really the place to be doing your GUI configuration.
I assume you're using WiX, it doesn't say so in your question but it's tagged with WiX.
I would have a read of http://wix.tramontana.co.hu/tutorial/user-interface-revisited (or http://www.dizzymonkeydesign.com/blog/misc/adding-and-customizing-dlgs-in-wix-3/ has a relatively easy to read example), you can add or edit any of the dialogue boxes in the installer, you'll need to download the source to get at the built in dialog, and it does require some "play" to get everything quite right but worth it to get a professional looking installer.