besihad Posted August 14, 2009 Share Posted August 14, 2009 (edited) hi, i am from Turkey, i want to start an access mdb file with runtime. but my code dosn't work. Parameter of ShellExecute command not adaptable with my directoy path. (there is Turkish characters and Space " " in my path) My codes: $Uygulama = "deneme.mdb" $UygulamaYolu = @ScriptDir & "\" & $Uygulama MsgBox(4096, "Bilgi:", @ScriptDir) ;MsgBox(4096, "Bilgi:", $UygulamaYolu) $KuruluDizin = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Access\InstallRoot", "Path") $Access = $KuruluDizin & "MSACCESS.EXE" ;MsgBox(4096, "Bilgi:", $Access) ;MsgBox(4096, "Bilgi:", $Access & " " & $UygulamaYolu) $baslat = ShellExecute($Access, $UygulamaYolu & " /Runtime") ;here is my error ;MsgBox(4096, "Bilgi:", $baslat) Thanks. Edited August 14, 2009 by besihad Link to comment Share on other sites More sharing options...
KaFu Posted August 14, 2009 Share Posted August 14, 2009 Normally the trick with shellexecute is, that you don't need the path of the application but windows starts the file with the default associated application. Try something like this: $Uygulama = "deneme.mdb" $UygulamaYolu = @ScriptDir & "\" & $Uygulama MsgBox(4096, "Bilgi:", @ScriptDir) #cs ;MsgBox(4096, "Bilgi:", $UygulamaYolu) $KuruluDizin = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Access\InstallRoot", "Path") $Access = $KuruluDizin & "MSACCESS.EXE" ;MsgBox(4096, "Bilgi:", $Access) ;MsgBox(4096, "Bilgi:", $Access & " " & $UygulamaYolu) #ce $baslat = ShellExecute($UygulamaYolu,"/Runtime",@ScriptDir,"open") ;$baslat = ShellExecute($Access, $UygulamaYolu & " /Runtime") ;here is my error ;MsgBox(4096, "Bilgi:", $baslat) OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
besihad Posted August 14, 2009 Author Share Posted August 14, 2009 Hi, very thanks to your answer.But, this code don't run Access Runtime mode. İt is worked normal mode. /Runtime parameter didn't used by shellexecute. Link to comment Share on other sites More sharing options...
KaFu Posted August 14, 2009 Share Posted August 14, 2009 Hadnt't Access at hand >_<... maybe this? $Uygulama = "deneme.mdb" $UygulamaYolu = @ScriptDir & "\" & $Uygulama ;MsgBox(4096, "Bilgi:", @ScriptDir) ;MsgBox(4096, "Bilgi:", $UygulamaYolu) $KuruluDizin = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Access\InstallRoot", "Path") $Access = $KuruluDizin & "MSACCESS.EXE" ;MsgBox(4096, "Bilgi:", $Access) ;MsgBox(4096, "Bilgi:", $Access & " " & $UygulamaYolu) Run(FileGetShortName($Access) & " " & FileGetShortName($UygulamaYolu) & " /Runtime",@ScriptDir) ;$baslat = ShellExecute($UygulamaYolu,"",@ScriptDir, "") ;$baslat = ShellExecute($Access, $UygulamaYolu & " /Runtime") ;here is my error ;MsgBox(4096, "Bilgi:", $baslat) OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
besihad Posted August 14, 2009 Author Share Posted August 14, 2009 Very Thanks KAFU, problem solved. 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