senatin Posted October 16, 2017 Share Posted October 16, 2017 #Region DETECTOR If FileExists(@systemDir & '\hmm.txt')Then ConsoleWrite("Your Good To Go") Else FileCopy(@scriptdir & 'hmm.txt',@SystemDir & 'hmm.txt',9) ConsoleWrite("Your Not Allowed To use This") Exit EndIf #EndRegion I dont understand Why this part of code doesnt execute as I want it be. I save a hmm.txt into system32 and run this code but always give me "Your Not Allowed to use This" even i added the FileCopy and let him paste it to dir and run again and again with same result. I think I quite dont understand how FileExists or @systemDir works. Please help me Link to comment Share on other sites More sharing options...
RTFC Posted October 16, 2017 Share Posted October 16, 2017 (edited) Well, for one, there's a backslash missing between @scriptdir/@systemdir and your filename in the FileCopy statement. Edited October 16, 2017 by RTFC My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O Link to comment Share on other sites More sharing options...
senatin Posted October 16, 2017 Author Share Posted October 16, 2017 (edited) Quote #Region DETECTOR If FileExists(@SystemDir & "\hmm.txt")Then ConsoleWrite("Your Good To Go") Else FileCopy(@scriptdir & "\hmm.tx",@SystemDir & "hmm.txt",9) ConsoleWrite("Your Not Allowed To use This") Exit EndIf Quote now its working but why other post in forum they use ' instead of " ' seems not working at all ARG its actually SysWOW64 and not System32 took me lot of tries before it works Edited October 16, 2017 by senatin 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