Jump to content

Win7 / WinXP script path question...


keilamym
 Share

Recommended Posts

im editing an XP script to add win7 support.. (we never used vista)

my current script looks in the $admin\system32 for files that have been installed, but when the app is installed on Win7, the files go into the $admin\SysWow64. the simplest method is to have 2 sets of command in my script if the OS equals win7 vs xp... is there anyone using a different concept to get information in two different folders based on the OS...

thanks in advance

Link to comment
Share on other sites

im editing an XP script to add win7 support.. (we never used vista)

my current script looks in the $admin\system32 for files that have been installed, but when the app is installed on Win7, the files go into the $admin\SysWow64. the simplest method is to have 2 sets of command in my script if the OS equals win7 vs xp... is there anyone using a different concept to get information in two different folders based on the OS...

thanks in advance

$admin being a variable replacement for @WindowsDir?

What you are talking about is not XP vs Win7, but 32bit vs 64bit.

Therefore, you must detect the windows version (a 32bit processor may only handle 32 bit however 64bit can handle both 32 and 64bit operating systems, however you are talking about the operating system architecture).

Try @OSArch

It should return x86 on the XP machine (32 bit) and x64 on the windows 7 machine.

Then it is just a cane of:

if @OSArch = "x86" Then

...

ElseIf @OSArch = "x64: Then

...

End

The reason this is not just an else command is because there are systems where you may come across such architectures as 128 bit (I heard windows 8 will be 64 and 128 bit only), and this keeps integrity for those systems, which you can include support for in your time if you so wish to do so.

shanet

[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:

%programfiles%/AutoIt3/autoit3.chm
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...