Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 10 of 10

Thread: problem with =

  1. #1
    Join Date
    Oct 2006
    Posts
    209

    Grin problem with =

    hi guys,
    another problem after long time,
    sorry if this is answered before, i m trying to do

    PHP Code:
    File.Run("sc""create myservice start= auto binPath= c:\\temp\\mr.exe obj= .\administrator password= Password1", -1true); 
    this is actually dos command to create service if i just runt this command from command prompt it works fine but if i place it in my app it does nothing and obviously gives no error either. so my doubt is = in this line, can some one please shed some light on this and point me to right direction.
    Last edited by wasim21k; 04-06-2009 at 07:09 AM.

  2. #2
    Join Date
    May 2006
    Posts
    1,443
    Maybe This ....?
    Code:
    start= auto binPath= c:\\temp\\mr.exe obj= .\administrator password= Password1", -1, true);

  3. #3
    Join Date
    Oct 2006
    Posts
    209
    nop,
    i even can not run half of this

    File.Run("sc", "create myservice start= auto binPath= c:\\temp\\mr.exe

    from this i think = is not passing to sc command

  4. #4
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    This worked for me on XP Pro SP3

    Code:
    File.Run("sc.exe", "create myservice start= auto binPath= c:\\temp\\mr.exe", "", SW_SHOWNORMAL, false);

  5. #5
    Join Date
    Apr 2005
    Location
    São Paulo, Brazil
    Posts
    2,539
    You better start the program properly, like

    Code:
    File.Run(_SystemFolder .. "\\sc.exe", "create myservice", "", SW_SHOWNORMAL, true);
    Just "sc" does not make a complete program name...

    Ulrich

  6. #6
    Join Date
    Oct 2006
    Posts
    209
    thanks for reply,
    File.Run(_SystemFolder .. "\\sc.exe", "create myservice start= auto binPath= c:\\temp\\mr.exe);

    i got that working thanks but now fell into another problem, this was just half of command,
    full command i wanted to run was

    PHP Code:
    "sc.exe""create myservice start auto binPath = c:\\temp\\mr.exe obj= ./scvadmin Displayname= "My service" password= Password1 
    now i can not pass ./scvadmin also "My Service" need to be in side "".
    sorry for dumb question but i m just stuck on here....

  7. #7
    Join Date
    Oct 2006
    Posts
    209
    i think i can answer my question here
    that .\administrator part
    it needs .\\administrator

    but now stuck with ""

  8. #8
    Join Date
    May 2006
    Posts
    1,443
    i think it should be like this
    Code:
    Displayname= \"My service\"
    Code:
    "sc.exe", "create myservice start auto binPath = c:\\temp\\mr.exe obj= ./scvadmin Displayname= \"My service\" password= Password1"

  9. #9
    Join Date
    Nov 2003
    Location
    Salzburg / Austria
    Posts
    312
    if you need " inside the string, change the outer " to '

    "sc.exe", "create myservice start auto binPath = c:\\temp\\mr.exe obj= ./scvadmin Displayname= \"My service\" password= Password1"

    "sc.exe", 'create myservice start auto binPath = c:\\temp\\mr.exe obj= ./scvadmin Displayname= \"My service\" password= Password1'
    "With a rubber duck, one's never alone."

    Douglas Adams, The Hitchhiker's Guide to the Galaxy

  10. #10
    Join Date
    Oct 2006
    Posts
    209
    thanx every one problem solved

Similar Threads

  1. Need help with AMS/WGet intergration problem
    By mystica in forum AutoPlay Media Studio 7.5
    Replies: 3
    Last Post: 07-04-2008, 12:40 AM
  2. Problem installing fonts
    By ByronFS in forum Setup Factory 7.0
    Replies: 5
    Last Post: 05-08-2006, 12:23 PM
  3. Video Problem
    By ScottDuncan in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 07-10-2004, 01:38 PM
  4. PROBLEM: Setup Starts and then Crashes
    By Support in forum Setup Factory 5.0
    Replies: 0
    Last Post: 10-15-2002, 03:02 PM
  5. INFO: Tips for Debugging Action Lists in AutoPlay Media Studio 4.0
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 08:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts