Need to run 32 bits program on a Windows 7 64 bits

ReneGe
ReneGe used Ask the Experts™
on
Hi,

I need to run a 32 bits program on Windows 7 64 bits.

So I installed it in C:\Program Files (x86)\erp\runerp.exe

That program must read an ini file located at C:\Windows\runerp.ini

Currently, I can run the program but it is unable to read the ini file so it's not working.

I also tried to run it "As Administrator"

Domain users have full rights on the ini file.

Can you please help me to make it work?

Thanks and cheers,
Rene
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Joe WinogradDeveloper
Fellow 2017
Most Valuable Expert 2018

Commented:
Hi Rene,

> That program must read an ini file located at C:\Windows\runerp.exe

That's not a folder. Even if you mean C:\Windows\, that's not a folder where an ini file should be stored. An ini file is typically stored in %AppData% if you want one for each user or in %ProgramData% if you want the same ini file for all users. Btw, I don't think the issue has anything to do with running a 32-bit program on 64-bit Windows — that should work fine. Regards, Joe
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
Where is the INI file. It may not work if located in Program Files because of Windows security.  You may need to store in a non-Windows secured location (Users folder as Joe suggested might work better.  Or make a folder c:\special_programs where Everyone has permission and keep the INI file there.

Author

Commented:
Hey John :)

Oops, thanks for noticing that.

I fixed my question :)
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Author

Commented:
The problem, is that I`m not the programmer and she had the brillian idea to put it in C:\Windows
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
I have seen programmers put data and like files in secured locations and then the programs do not work. Pick a neutral location (from the point of view of security)

Author

Commented:
Hey Joe,

Thank for noticing that as well :)

Author

Commented:
John, the location of the ini file is hard coded
Top Expert 2016

Commented:
Yes the programmer was absolutely brilliant

you can create a shim for this program that will redirect calls from this program to c:\windows to somewhere else using the application compatibility toolkit

Author

Commented:
@Joe

Any ideas how I can make that work?
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
You need to get the programmer to change the program. location of the ini file is hard coded  That is an XP style of programming

Author

Commented:
@David

Please note: Microsoft ACT version 5.6 is no longer actively supported. Please download the latest version from the Windows Assessment and Deployment Kit (ADK) for Windows 10 in the Related Resources section of this page

My client has Windows 7.  Will it work?


@John  That's my last recourse


Thanks :)
Joe WinogradDeveloper
Fellow 2017
Most Valuable Expert 2018

Commented:
Hi Rene,
I don't know how to make that work, but I see David's post about creating a shim for it. I never heard of that technique, but I have 100% confidence in David, so definitely give that a try. Or, if possible, contact the programmer and have her place the ini file where it belongs — in either %AppData% or %ProgramData%. Regards, Joe
Top Expert 2016

Commented:
ACT 5.6 was released in the Windows 7 timeframe.  Creating a shim is most useful when the application gets installed on many computers..

Author

Commented:
Hi David,

Sounds very cool!

I will try tomorrow.

A super thanks to all :)

Cheers

Commented:
Hi ReneGe, Just set the file C:\Windows\runerp.ini permission as:
remove all current permissions,
grant everyone with full rights.
Shaun VermaakTechnical Specialist
Awarded 2017
Distinguished Expert 2018

Commented:
Can you change the location of the INI file?
"Batchelor", Developer and EE Topic Advisor
Top Expert 2015
Commented:
Since Vista, applications not being compiled with the virtualization aware flag should automatically get a shim, redirecting writes to protected folders into %AppData%\Local\VirtualStore. If the file is not created automatically there, move the file to that location, and it should work.

Author

Commented:
I need help with "Microsoft Application Compatibility Toolkit 5.6"

Should I create a new question, or we continue here?

Thanks for all your help
Distinguished Expert 2018
Commented:
You read Qlemo's comment? It should work automatically, no shim needed.
So skip that shim thing. Please verify: is UAC even on? It is needed here.

Author

Commented:
Hi Qlemo,
Thanks for your solution.  I tried your solution but it did not work.

By the way, ""%AppData%\Local\VirtualStore\" does not exist.
 %AppData% points to -> C:\Users\UserName\AppData\Roaming\
"C:\Users\UserName\AppData\Local\" exist
"C:\Users\UserName\AppData\Local\VirtualStore\"
Should I create "C:\Users\UserName\AppData\Local\VirtualStore\" and put the ini file there?

Hi McKnife,
UAC was off.  I will try Qlemo's solution again with UAC on this time
Qlemo"Batchelor", Developer and EE Topic Advisor
Top Expert 2015

Commented:
I knew I forgot to mention something to be required (UAC) - thanks, McKnife.
And of course c:\Users\%UserName%\AppData\Local\VirtualStore is the correct "root" folder, which corresponds to C:\. That is, you have to create a Windows folder, then put the ini into that folder.

Author

Commented:
Tried in "C:\Users\username\AppData\Local\VirtualStore\inifile.ini" and it did not work :(
Distinguished Expert 2018

Commented:
Again: C:\Users\username\AppData\Local\VirtualStore\Windows is the path where the ini belongs.

Author

Commented:
In "C:\Users\%username%\AppData\Local\VirtualStore\Windows\" works -> Wohoooo!

But now getting another problem.  WIll come back to you shortly
JohnBusiness Consultant (Owner)
Most Valuable Expert 2012
Expert of the Year 2018

Commented:
If username is the user of the computer and that location does not work, there may be some issue with the program.

P.S. You said the location works and it should work for this type of application
Distinguished Expert 2018

Commented:
Unfair point distribution. Qlemo's was the initial idea.
Distinguished Expert 2018

Commented:
Fairer point division.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial