tsicoupe Posted September 9, 2015 Share Posted September 9, 2015 Hello i am having some issues with this working. I am trying to run this to see if the file is located in program files or on 64bit program files x86 and then run the program. Here is what i have so far:If FileExists "%ProgramFiles%\Common Files\SMART Technologies\SMART Product Update\activationwizard.exe" (Then $vPPATH="%PROGRAMFILES%")else (Then $vPPATH="%PROGRAMFILES(x86)%")Run "($vPPATH)\Common Files\SMART Technologies\SMART Product Update\activationwizard.exe"I know this is probably pretty basic but I am new here and cannot get this variable to work properly. Any help would be appreciated. Thanks Link to comment Share on other sites More sharing options...
Danyfirex Posted September 9, 2015 Share Posted September 9, 2015 (edited) Run ($vPPATH & "\Common Files\SMART Technologies\SMART Product Update\activationwizard.exe")You must read Basic of AutoItSaludos Edited September 9, 2015 by Danyfirex Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Developers Jos Posted September 9, 2015 Developers Share Posted September 9, 2015 (edited) There are more things wrong with that code:Brackets missing for FileExists function.Environment variables won't be resolved unless specifiedEndIf is missing.Start with opening the helpfile and checking syntax. Jos Edited September 9, 2015 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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