Sign in to follow this  
Followers 0
keilamym

Win7 / WinXP script path question...

4 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

shanet... good catch... thanks boss... appreciate it...

Share this post


Link to post
Share on other sites

this worked for me... i wasn't using @SystemDir

$ChkFile = "\\" & $Workstation & "\" & @SystemDir & "\

Share this post


Link to post
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
Sign in to follow this  
Followers 0