How to run MSVC++ 6.0 off a USB drive as a portable app - visual-c++

Without using any third party program to do this (i.e. without VMware ThinApp, U3 or MojoPac etc.) How to move MSVC++ 6.0 from from its install on C: over to a USB drive? So that it can be used on different PCs with no admin rights and without installing anything on the host PC? Even if it's only usable as a console application would be fine, although to have the GUI including Visual Assist etc. would be even better.

Move the two folders that install created under c:\program files\ to the USB drive (e.g. to e:\progs\msvc\msvc6 and e:\progs\msvc\vc98), and append to the file e:\progs\msvc\vc98\bin\vcvars32.bat to suit e.g.
prompt $g
set path=e:\progs\uedit;e:\progs\utl;%PATH%
e:
cd e:\work
start e:\progs\uedit\uedit32.exe /i=e:\progs\uedit\uedit32.ini
cmd /k
Using a shortcut to vcvars32.bat then works fine for doing any simple console programming, which is all I’m using it for so far. I don’t know how well any of the GUI type programs in the tools folder will function.

I am not sure exactly how one would do that.
Here are a few ideas.
The installation procedure creates at least two sets of directories, so you could direct both of them onto the usb drive.
The installation procedure creates a bat file, that sets up the environment variables correctly for command line execution. Modifying it to point to the correct drive letter when your memory stick loads on the other machine may be important.
There are also registry entries for vc 6. Extracting them, and having a script of some sort to load them onto your target machine when needed, might be useful.
Is there a specific reason why vc 6 is required? Would another compiler do?

I haven't done this, but it should "just" be a matter of:
Copying all the application files to a USB drive. Remember there will be shared files and stuff that may need to go into the Windows directory.
Identifying and copying all of the registry entries, although you may need to be admin to create some of these on the target machine.
That's a heck of a lot of work, for little gain in my opinion. I think there may be a command line only version of the Visual C++ tool chain that may better suit your requirements. IIRC it was released to help people create build bots for open source projects, like the Mozilla Tinderbox, and includes the VC++ 7.0 compiler.

Related

Loading ROMS to Emu OS

I recently downloaded Emu OS (a Linux distro) and installed it within virtual box. Everything works fine but I am unable to actually run the roms within an emulator. I tried a GBC rom that is in .zip format and I copied and pasted it into the GB and GBC folder, but the emulator itself isn;t able to recognize it. Does anyone have any experience with this or have gotten it to work?
One must simply drag the ROM file to the directory that is associated with the respective emulator. This can be done via the file manager. Afterwards, reboot and select the emulator that you desire and your game should show up in the list.
Note that EmuOS is extremely old and no longer maintained. RetroPi is a good alternative and putting ROMs on that is the same as EmuOS.

Using signtool without Windows SDK?

Can I use signtool on Windows 10 without the Windows SDK (2.5 GB) installed? Can I just copy the signtool.exe from a different machine?
I am building a cross platform application for Windows inside a VM which resides on my pretty small SSD, thus I don't want to blow it with unnecessary software.
OK, sometimes one should just give it a try instead of asking questions ;-) If anyone stumbles upon this:
Yes, one can just copy the small signtool.exe from a different machine (under Win 10 usually located at C:\Program Files (x86)\Windows Kits\10\bin\x64\) to your path (e.g. C:\Windows\).
No additional libraries are needed.

Conversion to x64 platform in visual studio failing

So I built a huge website for my company using the AnyCpu option. I didn't think it would matter - I have a 64bit machine with x64 windows, it's getting deployed to a x64 server, and there's no attached dll's, so it should just all be in 64, right?
Well, in the process of trying to implement some security, the company's support told us the application MUST be strictly x64. I figured it was, but to humor them, I went into the configuration manager, and changed all the target cpu, platform etc settings to x64.
Unfortunately now, it breaks when I hit f5 to run it. I've run into this before, I think, and I vaguely remember needing to delete some temp internet files somewhere, but I tried closing VS, deleting the bin folder, deleting the root folder from /framework/tempASPfiles... but I still get the BadImageFormatException - "an attempt was made to load the program with an incorrect format."
What's the best and fastest way to convert an app to x64? and am I right in thinking I need to delete some files somewhere?

Visual Studio 2012-Update 2 Won't Load Solution if SUO File is Present

I develop in VS 2012/.NET on several computers (all running Windows 8 Pro x64). Although VS is installed on all computers I keep the project folder on an external USB3 drive. Every once in a while I would find the project files had been corrupted on the USB drive (e.g. cross-linked). Fortunately I keep frequent backups but clearly this situation is intolerable, so I set out trying to find what the issue(s) might be.
I still don't have a clear answer but one piece of strange behavior is this: if I open the .SLN file for my project in VS 2012 when an .SUO file is NOT present it loads fine, builds are OK, etc. HOWEVER, if I then save the project, exit VS (so an SUO file is created) and then attempt to REOPEN the solution VS hangs at (....loading). I get the usual "Visual Studio is busy....." messages and there is no point in waiting, the solution just never loads. I have to kill VS in TM. I've tested this repeatedly, and I've even done it from the local hard disk (as opposed to the USB drive) to see if USB was the problem. It isn't. Remember, this is all on the same computer (so as to remove "moving" as the cause of the issue). The only way I can work with the project is to delete the SUO file before trying to open it.
I would assume, if this was a VS bug, it would be pretty much all over the web and my searches would have turned up something. So I'm asking if anyone has any idea what the problem might be or if there are links that might help me figure things out.
Thanks in advance.

Converting Windows App written on XP to Windows 7

I inherited a huge code base which was written to work on Windows XP. Now we would like to migrate to Windows 7. I do not know what is the proper way to go about this. What is the proper approach to do the above task? I did some googling on differences between XP and Windows 7 but I do not get any proper links which describe how the internals of 7 differ from XP. Any links will be appreciated.
Usually how do S/W developers migrate their code/apps written for one version of OS say Vista to Windows 7?
I sell an autoupdate solution (AutoUpdate+, minor plug) and so have lots of experience porting Windows apps to the latest releases, and yet still maintaining backwards compatibility. Porting from Windows XP to Windows 7 can be a big challenge (there should be almost no difference in a move from Windows Vista to Window 7).
Window XP doesn't care where your application exists, and hence programmers would dump both their application and support logic (log files, config files, user profiles etc.) into the same location under "C:\Program Files\". Take this application to Windows 7 and you'll start finding some unusual behaviors. For starters, you will notice that files seem to 'disappear'. Instead of a log file being modified under the common Program Files location, you may end up with multiple, and separate, copies for each user under "Compatibility / Program Files". Windows Vista/7 introduced file system virtualization, and will now create separate user instances of files to ensure to ensure that each user has their own secure copy.
Another problem you will encounter on Windows Vista, and to a lesser extent on Windows 7, is User Account Control (UAC) prompts. It's similar to the issue above, in that new security restrictions will now cause Windows Vista/7 to prompt the user for approval to proceed. The most noticeable area where this occurs is when you are tampering with executable files in sensitive directories, installing applications and drivers, and sometimes when trying to self-update an app (the abovementioned app actually works around these prompts with some smart logic).
So in short, security changes are the biggest difference between Windows XP and Windows Vista/7. Your best start is to separate application logic (binaries) from supporting logic, by putting the latter into user specific directories. Some apps may never be fixable and can be forced instead to work in Compatibility Mode or to launch always under the Admin account context --- poor workarounds, but may be suitable in your company.
Simon # http://AutoUpdatePlus.com
There are three parts to the migration. First, make it just plain work. This means fixing up hardcoded file paths (there's no more Documents and Settings), changing some of your save locations so you don't need to be elevated to work properly and don't rely on virtualization, changing some of your registry key locations for the same reason, and coping with high-DPI which might now be applied automatically based on screen size rather than as a user's choice.
Second, make it look and work like a Windows 7 application. Is your jumplist usable? Your thumbnail? You get some things for free, do you like what you get or would you like to take control? Are there obvious wins you could use like thumbnail buttons, jumplist tasks, taskbar overlays, etc. Don't surprise your users and don't disappoint your users. (Example of disappointment: VS 2008 and the crummy jumplists it offered. They had the excuse of being released before Windows 7 - you don't.)
Third, take advantage of Windows 7 to be greater than you otherwise would. Stop polling for network joins, file creation, hardware being plugged in, going on and off AC power etc and learn how to get notified when those things happen. Add touch support beyond what you get for free. Talk to a sensor or GPS for the first time, since Windows 7 makes it simpler than it ever was. That sort of thing.
1 is not optional. 2 is really not optional either, a year after Windows 7 is released. 3 will differentiate you and I recommend, once you get past 1 and 2, you look into it.
Basically Windows7 is a 4bit OS and so necessarily runs on a 64bit processor environment. XP has 32bit as well as 4 bit flavours. If your application is for the 32bit version of XP, in that case, the major migration means making the application run on 4bit OS effectively.
The basic steps can be something like this:
Make it compatible to 64bit win7. So you may just compile the code off a win7 machine (on 64bit). If the compilation works fine, you might be able to run the app successfully.
The first step just allows to move ahead. But your application might not be effective. In that case, you might have to review the code for any specific implementation coupled on 32bit os and upgrade them to take advantage of 64bit OS.
The major advantages on 64bit OS is higher address-ability (so access more RAM) and also cache etc.
I did some googling on differences between XP and Windows 7 but I do not get any proper links which describe how the internals of 7 differ from XP. Any links will be appreciated.
API diff report between XP and Vista: https://abi-laboratory.pro/compatibility/Windows_5.0_to_Windows_6.0/x86_64/abi_compat_report.html
API diff report between Vista and 7: https://abi-laboratory.pro/compatibility/Windows_6.0_to_Windows_7.0/x86_64/abi_compat_report.html
The reports are generated by the abi-compliance-checker tool.

Resources