NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

testand returns fail path in windows7

Solved!
Go to solution

hi,

it seems that TS4.1.1 returns fail path in windows7 when sequence file is installed in normal program installation path including word c:\program in path. in swedish version of windows7 programs are installed in folder c:\program\ instead of c:\program files\ as in english version. when asking in runstate in which folder the seq file is in swedish version, path c:\program files\ is returned. work around is to execute the sequence file in another folder like c:\temp\.

 

does somebody know if this issue is fixed in later testand versions ?

 

I attach simple sequence file to test this. compare results when executed it from c:\temp or c:\program\ folders (c:\program\ is the default program installation folder in swedish windows7).

 

best regards,

petri  

0 Kudos
Message 1 of 24
(4,401 Views)

 

I updated to TS2010 and the problem remains.

 

Problem is that attached sequence file returns fail paths when executed from c:\program\subfolder in windows7 swedish version. I have not been able to test in other OS language versions. in Swedish windows7 the program installation directory is c:\program instead of c:\program files as the attached sequence file returns.

 

any help ?

 

regards

petri

 

 

0 Kudos
Message 2 of 24
(4,270 Views)

Hi Petri,

 

This behavior is caused by localized folder names in Windows.  The following links have some related information:

http://www.sevenforums.com/general-discussion/48373-program-files-local-language-versions.html

http://msmvps.com/blogs/carlosq/archive/2007/02/12/windows-vista-junctions-points-mui-and-localized-...

http://msdn.microsoft.com/en-us/library/bb762189%28VS.85%29.aspx

http://blogs.msdn.com/b/michkap/archive/2007/01/18/1487464.aspx

 

Please let us know if there is a problem working around the issue and what you are trying to accomplish - we may be able to help.

 

Thanks,
Jim

0 Kudos
Message 3 of 24
(4,261 Views)

Hi Jim,

This seems to be a little tricky one to find a workd around for me.

 

I use TS deployment tool to deploy the sequence files to deployment stations running both in XP and Windows7. I assume in my sequence file I need a step which checks the windows operating system version and selects the path calling functions based on the operating system version.

Any hint how to start with that is appreciated. I'm familiar with calling active X/COM and DLL steps in TS.

 

best regards,

Petri

 

    

0 Kudos
Message 4 of 24
(4,242 Views)

Please explain in what way the path is causing problems for you? In your example all you are doing is displaying the paths, what is your actual need for the paths and what problem is is causing?

 

-Doug

0 Kudos
Message 5 of 24
(4,233 Views)

In reading some blog posts it sounds like the localization is purely cosmetic and that the real directory name is still "program files". Why do you need the localized name? For cosmetic display purposes?

 

-Doug

0 Kudos
Message 6 of 24
(4,230 Views)

 

I have also understood after reading the links that the language package only do some visual changes to path names maintaining the unlocalized path names in the "bottom" in vista and win7. This causes an elementary problem when using variables in my example; TS OI only sees the visual path names but the variables store the unlocalized paths. Finally, in runtime, when I need to save files, like report, the TS OI tries to save report to visual  c:\program path and therefore runs in to a runtime error. Of course, I could hard code the paths used in swedish OS, but that's not a good solution from my point of view because one day someone may use other OS language.

 

What I need is to check in which win OS sequence file is executed, do the callings to path names according to that. In win7 I need to call localized path names. 

 

Regards,

Petri

 

 

0 Kudos
Message 7 of 24
(4,217 Views)

 

one unclarity in my text above.

 

shall state ...the TS OI tries to save report to unlocalized c:\program files path and therefore runs in to a runtime error because it sees only the localized c:\program path. 

0 Kudos
Message 8 of 24
(4,217 Views)

 


@Petri wrote:

 

one unclarity in my text above.

 

shall state ...the TS OI tries to save report to unlocalized c:\program files path and therefore runs in to a runtime error because it sees only the localized c:\program path. 


 

This is odd. I would have thought the opposite would be true from the blogs I have read. I thought "program files" is what would work programmatically and that "Program" was purely cosmetic.

 

What do you mean by, "TS OI only sees the visual path names"? Do you mean it's getting the localized name "Program"? That contradicts what you wrote later. Also, how is it getting the localized path if that's what you meant? From a file dialog? From somewhere else?

 

One possibility is that the problem you are seeing might be due to the space in the path name and might not be related to the localization. When using paths with spaces in them on the command line you must surround them with quotes.

 

-Doug

0 Kudos
Message 9 of 24
(4,206 Views)

 

I attach screen dumps to try to clarify the problem more clearly.

 

File "folder structure.jpg" shows the folders in swedish win7. note that there is no c:\program files\ folder.

File "paths in OI.jpg" shows what the path.seq file returns in variables when executed in operator interface (OI) in swedish win7.

File "saving to folder.jpg" shows the error message when using path returned from one of the variables above as input to a step which writes a report using active X/com Excel interface. (I use here simple seq file to demonstrate writing a report using Excel). The error message is saying that the path is not found which it gets to save as function. And that path is got from the variable TS returns.

 

Seq files (path.seq and writing to report using excel) are executed successfully in swedish XP. This is due to that variables TS returns has correct paths.

 

Finally I answer to your questions.

Perhaps there is something more I have not completely understand. In my understanding the TS OI and Excel use the localized paths, but TS variables use the unlocalized paths. That conflicts because the applications doesn't find the unlocalized paths. Solution I see is that there should be support in TS API to return the localized paths to unlocalized paths. Interim solution could be what I wrote; check OS version do things according to that. 

Paths I get in runtime are from variables displayed in path.seq execution.

I don't use any hard coded paths in my sequences so the quotes or the white spaces are not the problem.

 

regards,

petri

 

 

 

 

 

 

   

 

 

 

 

 

0 Kudos
Message 10 of 24
(4,189 Views)