Jump to content

Any issues using EXEs built with Win7 on a WinXP PC?


Recommended Posts

A few things to be aware of is the application may look different because of the themeing controls and fonts that are used are different.

Also be aware that with UAC in Winodows 7 you may not have the ability to write registry. Even as an administrator you need to turn UAC down to be able to write in most of the registry (user access may work I'm not sure).

Not specifically XP to 7 but also be aware that with 64 bit Windows OSs have a "Program Files (x86)" folder and that hard coded paths to C:\Program Files are bad.

That also reminds me that hard coded paths to "C:\Documents and Settings" are also bad and should be using system variables to user files or temp files.

Assuming you avoid, or are aware of these issues it should work just fine.

  • Like 1
Link to comment

hooovahh has the right of it. I updated code to work with Win7 last year; the main gotchas were accessing the registry and directories because of the UAC. I found that the program has to request higher level access to get to the registry, so I chose to eliminate accessing the registry all together. The installer put the application with its configuration files in the Program Files directory; Win7 wouldn't allow modification of those files (possibly also requiring requesting higher level access?) so I had the application go into "C:\<app name>\" instead and the commonly modified configuration files go into to the all-users application data folder (per Microsoft website). I could have turned off the UAC entirely and not made any changes, but the software will get installed on a variety of network setups depending on the specific plant's IT so it was better to follow MS's guidelines.

Link to comment

... so I had the application go into "C:\<app name>\" instead and the commonly modified configuration files go into to the all-users application data folder (per Microsoft website).

If you can access the application data folder fine, why did you move the application as well? I ask because I feel that applications burrowing into my root folder is messy and crude. Granted, on test PCs this rarely matters.

Additionally, if your application configuration does not explicitly need to be accessible by all users, an application will always have write permissions to the user's My Documents folder (unless it's been deleted, of course, but I've never seen this in practice).

Link to comment

If you can access the application data folder fine, why did you move the application as well? I ask because I feel that applications burrowing into my root folder is messy and crude. Granted, on test PCs this rarely matters.

The code updates some typedefs in dynamically loaded code. This couldn't have happened with the default UAC if the code was in Program Files. I vaguely recall having some issues with opening VIs through VI server, but can't recall them at the moment. This was with LabVIEW 8.6; I'm not certain if 2011 would work differently.

Additionally, if your application configuration does not explicitly need to be accessible by all users, an application will always have write permissions to the user's My Documents folder (unless it's been deleted, of course, but I've never seen this in practice).

Most of our systems go on plant floors. We lock the systems down hard for the autologin user when we can as we've gotten too many calls from customers of poor system performance to find out that the operators have been playing games, doing homework, surfing the internet, etc., on the machines. There is a second "supervisor" user for the plant engineers, IT and us to debug and update the system. The plant IT I've worked with when our system is on their network does something similar (though not usually as aggressive). We had one plant that didn't do any of that; it took a week and a half to get them back up running full production while we cleared out the viruses (they are now a believer in imaging hard drives as well).

Link to comment

Thanks for the replies, but we might be getting off topic now. I was asking about developing on a Win7 PC and using the executable on a WinXP PC. Maybe Win7 specific issues should go in another thread.

I guess it wasn't clear you weren't referring to usability of the code. There is no issue with building an executable on one version of Windows and running it on another, so long as the bitness (x86 vs x64) and LV runtime versions matches. In both cases, the program won't try to execute if it doesn't have the correct prerequisites.

The issues we were discussing have more to do with the practical question, "Will code I write on a Win7 PC always work on a WinXP PC?"

Link to comment

The installer put the application with its configuration files in the Program Files directory; Win7 wouldn't allow modification of those files

I had this problem with Win7 but fixed it by unlocking the folder in the project "Build Specifications".

Under "Source File Settings", select your destination folder below the "Program Files" folder and set the "File and Folder Attributes" to "[x] Unlock".

  • Like 1
Link to comment

I had this problem with Win7 but fixed it by unlocking the folder in the project "Build Specifications".

Under "Source File Settings", select your destination folder below the "Program Files" folder and set the "File and Folder Attributes" to "[x] Unlock".

Just a note that LV 8.6 doesn't have that option, but 2011 does. Not sure about inbetween.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.