PDA

Click to See Complete Forum and Search --> : Install VB6 application on Window XP and Vista


Andraw
Jun 7th, 2008, 09:23 PM
Hi, all,

I use INNO Setup & ISTool create a setup.exe file for VB6 application to work in Window XP computer. Now my client wants to deploy the applicaton to vista computer. Do I need to do some change to this script code to make it work on both window XP and vista?

It's urgent.
Thanks a lot.

dilettante
Jun 8th, 2008, 09:33 PM
I'm not an Inno-anything guy, but...

Vista32 should detect your setup as a legacy installer and allow it to run after prompting for elevation. I'm not sure that legacy installers work in Vista64, but the usual problem there is the use of 16-bit code in many scripted installers.

The bigger issue might be your program's use of protected filesystem and registry locations. Most of HKLM is off limits without elevation. Your program's Program Files folder is read-only without elevation.

If your program is detected as a legacy application it will be subjected to AppCompat shims, which will cause attempted writes to protected locations to result in virtualization for both the filesystem and registry. This can have unexpected results, but your program might work just fine: though different users will "see" different virtualized copies of the information.

There is no automatic AppCompat for legacy applications on Vista64. Break the rules there and BOOM you die.


Ultimately you'll want to rewrite your application for the Windows Application Guidelines that Vista now enforces and mark it "Vista aware" via a manifest. Ideally you'll move to a Windows Installer MSI package as well, though for now scripted setup EXEs still work. All of this works down-level, i.e. on Windows XP and 2000, and in many cases as far back as Win95 if the proper updates were installed.

I'm sure others will offer more specific assistance.

sirajudeen
Jun 9th, 2008, 03:20 AM
I have created a setup of a vb V6.0 application and it works fine with all operating systems upto Windows XP,2003
I am having slight problems/ difficulties as the setup is supposed to create a ODBC(system DSN) connection to SQL server database to connect my application from VB frontend. The remaining part of the setup is correctly working.
However, this ODBC is not created and is found missing. But if i manually created the ODBC connection, the application works fine

Someone could u please help me how to create a ODBC connection(system DSN) for my setup to work in Vista also. Actually the setup is supposed to create a ODBC(System dsn) connection as the setup completed its installation.

I found out that if i had UAC disabled (User Access Control) feature of Vista disables, the setup creates the ODBC (system DSN) and works fine.


could you please guide me what to do...

dilettante
Jun 9th, 2008, 12:20 PM
Unless you are only deploying your applications in a controlled environment (i.e. where you can force UAC to be disabled for all systems) you'll have to settle for creating system DSNs at installation time. This means they can't be subsequently altered without elevation either.

System DSNs had proven to be an attack vector and have long been deprecated by Microsoft. Things are safer in Vista now because programs running as a standard user can no longer alter them... but also because this is one part of HKLM that Vista treats specially. Unlike most of HKLM the registry branch for system DSNs is never virtualized for legacy applications.

This ensures that programs cannot modifiy even a virtualized copy of the DSN subtree of HKLM.

Creating System DSNs on Vista (http://blogs.msdn.com/vistacompatteam/archive/2007/02/07/creating-system-dsns-on-vista.aspx)


In most cases you don't want to use ODBC anyway. It adds a layer of indirection when ADO is used, for example. But if you must do this you'll have to settle for installing system DSNs during an elevated install, moving to file DSNs, or moving to DSN-less connections. Otherwise you must turn off UAC: something few users do, nobody really should do, and in corporate settings typically not an option.