plgii Posted July 1, 2009 Share Posted July 1, 2009 I need to start a database server I try: RunWait(@ComSpec & " /c " & "dbeng9 -n pos1 -qi d:\SpiritPOS\Data\SpiritPOS.db -gk all") but only the dbeng9 runs. How do I get the parameters to run? Link to comment Share on other sites More sharing options...
GodlessSinner Posted July 1, 2009 Share Posted July 1, 2009 (edited) How do I get the parameters to run?- Read Help_File at ShellExecute Edited July 1, 2009 by Vitas _____________________________________________________________________________ Link to comment Share on other sites More sharing options...
plgii Posted July 1, 2009 Author Share Posted July 1, 2009 This is the script and when it runs I get error: Can not redeclare a constant.: Global Const $PBS_SMOOTH = 0x00000001 Global Const ^ ERROR code to start db works on its owndbstarttest.au3 Link to comment Share on other sites More sharing options...
GodlessSinner Posted July 2, 2009 Share Posted July 2, 2009 #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <Process.au3> #include <StaticConstants.au3> Global Const $PBS_SMOOTH = 0x00000001; The progress bar displays progress status in a smooth scrolling bar Global Const $PBS_MARQUEE = 0x00000008; The progress bar moves like a marquee Global $i=0 Do GUICreate("Start Database", 410, 380,-1,-1,$WS_EX_DLGMODALFRAME, $WS_EX_TOPMOST) GUICtrlCreateLabel("STARTING SPIRITPOS DATABASE...PLEASE WAIT", 60, 30, 350, 300) GUISetState(@SW_DISABLE) $Progress6 = GUICtrlCreateProgress(24, 86, 360, 25, BitOR($PBS_SMOOTH,$PBS_MARQUEE)) GUISetState() AdlibEnable("Advance", 50) Until ProcessExists ( "dbeng9.exe" ) FileChangeDir("d:\program files\sybase\sql anywhere 9\win32") RunWait("dbeng9.exe -n pos1 -qi d:\SpiritPOS\Data\SpiritPOS.db -gk all") Func Advance() For $i = 0 To 100 Step 1 GUICtrlSetData($Progress6, $i) Next EndFunc You seen an error, because Global Const was inside Do..Until, - Global Const must be declared only once. _____________________________________________________________________________ Link to comment Share on other sites More sharing options...
plgii Posted July 2, 2009 Author Share Posted July 2, 2009 Tried that, but when you run it it runs wild and fires the program several times Link to comment Share on other sites More sharing options...
GodlessSinner Posted July 2, 2009 Share Posted July 2, 2009 Try this: FileChangeDir("d:\program files\sybase\sql anywhere 9\win32") ShellExecute("dbeng9.exe", "-n pos1 -qi d:\SpiritPOS\Data\SpiritPOS.db -gk all", "", "") _____________________________________________________________________________ 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