keilamym Posted December 16, 2010 Share Posted December 16, 2010 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 More sharing options...
shanet Posted December 16, 2010 Share Posted December 16, 2010 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 @OSArchIt 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...EndThe 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 More sharing options...
keilamym Posted December 16, 2010 Author Share Posted December 16, 2010 shanet... good catch... thanks boss... appreciate it... Link to comment Share on other sites More sharing options...
keilamym Posted December 16, 2010 Author Share Posted December 16, 2010 this worked for me... i wasn't using @SystemDir $ChkFile = "\\" & $Workstation & "\" & @SystemDir & "\ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now