tonycst Posted August 20, 2015 Share Posted August 20, 2015 (edited) Here is the simple code.Global $ProgDir = @HomeDrive & "\Program Files (x86)" Global $Progs = $ProgDir & "\Image-Line" DirCreate($Progs) If FileExists($Progs) = 0 Then MsgBox(16, '', 'Sorry. Did not work :(') ElseIf FileExists($Progs) = 1 Then MsgBox(64, '', 'For some reasons it works for you') EndIfSomehow no folder is being created.Even giving straight forward DirCreate("C:\Program Files (x86)\Image-Line") wont do it.Please help.I run Win10 as administrator and i have ton of issues with it all the way down to "cant even see pictures in photoviewer because of administrator account" Edited August 20, 2015 by tonycst Link to comment Share on other sites More sharing options...
tonycst Posted August 20, 2015 Author Share Posted August 20, 2015 Found it.Needed to have #RequireAdminBut having it poses other problems such as issues with start up.Scripts that have #RequireAdmin in them fail to run if added to start up in registryFor example:#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=ALaunch_ZDEFTOOLBAR.ico #AutoIt3Wrapper_Outfile=Start ALauncher.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** $RegFile = '"' & @ScriptDir & '\ALOptions.reg"' $RegKey = '"HKEY_CURRENT_USER\Software\Advanced Launcher"' ;Quoted already RunWait(@WindowsDir & "\regedit.exe /S " & $RegFile) ;File to registry RunWait(@WindowsDir & "\regedit.exe /E " & $RegFile & ' ' & $RegKey) ;Export to file RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run", "Advanced Launcher loader", "REG_SZ", @ScriptFullPath) RunWait(@ComSpec & ' /c regedit /e ALOptions.reg "HKEY_CURRENT_USER\Software\Advanced Launcher"', '', @SW_HIDE) Run("ALaunch.exe")The above scrip gets complied into EXE and ran once.When it ran, it adds its self to start up in registry and is executed every time user is logging in.But without #RequireAdmin it does not even start to execute.Why is that ? 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