Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no SimplyVBUnit project template after install of 5.0.4 #12

Open
mcdon-ron opened this issue Feb 19, 2020 · 9 comments
Open

no SimplyVBUnit project template after install of 5.0.4 #12

mcdon-ron opened this issue Feb 19, 2020 · 9 comments

Comments

@mcdon-ron
Copy link

this issue looks the same as https://sourceforge.net/p/simplyvbunit/discussion/415411/thread/807817da/

looks like the install is trying to get the path by reading the registry
RegQueryStringValue(HKCU,'Software\Microsoft\Visual Basic\6.0', 'TemplatesDirectory', TemplateDir);
which doesn't exist on my machine

I think it could use the ProductDir registry key in HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Basic to get the install folder for vb6, then append "TemplatesDirectory". I couldn't say if people are seeing different registry keys for their VB6 setups, or why the key for "TemplatesDirectory" doesn't exist on my machine.

copying "frmTestRunner.frm" and "SimplyVBUnit Project.vbp" from "C:\Program Files (x86)\SimplyVBUnit 5.0\Source\Projects" to "C:\Program Files (x86)\Microsoft Visual Studio\VB98\Template\Projects" got the templates added.

@BluejacketScott
Copy link

I concur with @mcdon-ron . I installed vb6 fresh along with all sp's and am running it as admin. Using the setup script from sourceforge did indeed create the files in C:\Program Files (x86)\SimplyVBUnit 5.0 but it didn't copy the two necessary files to the C:\Program Files (x86)\Microsoft Visual Studio\VB98\Template\Projects directory. Manually copying them did work.

@kellyethridge
Copy link
Owner

Hello,

Trying to track this thing down. I attempt to pull the Visual Basic 6 directory from the Registry. It seems to be hit or miss. I've extended to look at other Registry locations I'd expected a directory to be found.

In this fix I first check for an entry of TemplatesDirectory in HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0 registry location. If that fails I then check for ProductDir in HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Basic. If I find that I just append "Templates" to the path.

Could either of you check registry locations HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0 and HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Basic and let me know if you find either of the corresponding keys?

Thanks for any help.

@BluejacketScott
Copy link

Hi Kelly
I looked at HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0 and found this key:
TemplatesDirectory: C:\Program Files (x86)\Microsoft Visual Studio\VB98\Template
which at first blush seems right except the path ends with Template, whereas it seems we need it to be Template\Projects

And at HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Basic I found:
ProductDir: C:\Program Files (x86)\Microsoft Visual Studio\VB98
which, again, is very close but not quite on target

Noting that neither key shows the full path to the correct target location: C:\Program Files (x86)\Microsoft Visual Studio\VB98\Template\Projects

@kellyethridge
Copy link
Owner

Thanks for checking. I do complete the path to which ever registry entry is found, 'Projects' for the first and 'Template\Projects' for the second. So it seems the install should have been able to build the correct path from the TemplatesDirectory key. So I don't know what happened.

I've added a wizard page during install that allows the user to select the Projects folder already pre-filled with whatever I was able to find from the registry. But, it seems your install should have worked anyway.

Could you uninstall SimplyVBUnit including the files you added to Projects templates and then try re-installing using the command simplyvbunitsetup-5.0.4.exe /LOG="c:\SimplyVBUnitInstall.log" and send the log? Maybe some light can be shed on what's going on since I'm unable to reproduce the issue. The usual works-on-my-machine situation.

@BluejacketScott
Copy link

Sure, glad to lean in. So here's what I did:
Control panel -> Uninstalled SimplyVBUnit
File Explorer -> Manually deleted C:\Program Files (x86)\Microsoft Visual Studio\VB98\Template\Projects"frmTestRunner.frm" and "SimplyVBUnit Project.vbp"
Verified that SimplyVBUnit directory gone from C:\Program Files (x86)\

Started VB6 as Admin and verified that project templates no longer listed
Redownloaded SimplyVBUnitSetup vn 5.0.4 from here and ran the cli setup as you requested.
Noticed that the two renegade files were INDEED put in C:\Program Files (x86)\Microsoft Visual Studio\VB98\Template\Projects this time
Started VB6 as admin and verified that project templates are again available

It appears that it only fails on a completely virgin computer. If it would be helpful, I'm willing to purge my system again, crush my user profile and reinstall to verify if it's related to a user profile issue. Let me know what you'd like me to check - I'm ready to help....

Results:
See attached log file
SimplyVBUnitInstall.log

@BluejacketScott
Copy link

Any luck or is there anything I can do to assist/test?

@kellyethridge
Copy link
Owner

I don't really know where to try. If you're correct that it fails to copy the files on a virgin computer, then maybe running the installer as Admin will make a difference. What you've shown is that the installer is correctly discovering the location of the project templates folder and at least attempting to copy them. There's not much more I can really do. If the admin privilege solves the issue then I think I can make the installer run with elevated permissions required.

@BluejacketScott
Copy link

BluejacketScott commented Oct 24, 2020 via email

@mcdon-ron
Copy link
Author

If they'd still help, attaching what I have for HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0 as vb6-keys-1.txt and HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\6.0\Setup\Microsoft Visual Basic as vb6-keys-2.txt
vb6-keys-1.txt
vb6-keys-2.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants