Announcement

Collapse
No announcement yet.

Need help with a command.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need help with a command.

    Solved!

    Hi all ,

    i dont know what i forget but i cant get this specific line to work in my script.
    This is a piece of a script im writing for hs3.

    I converted from bat to vb .

    this is the original line :
    Code:
    7zG a -tzip "D:\HS3B\test.zip" "C:\Program Files (x86)\test1\*" -mx5
    this wil make a zip file of C:\Program Files (x86)\test1\ and put it into D:\HS3B\




    But when i try to run this script it says its missing a comma or a )

    PHP Code:
    Imports System.Diagnostics
    Imports System
    .ComponentModel

    Sub Main
    (parm as object)


    Process.Start("CMD""/k 7zG a -tzip "D:\HS3B\test.zip" "C:\Program Files (x86)\test1\*" -mx5
    end sub 
    so i changed it to :
    Code:
    Process.Start("CMD", "/k 7zG a -tzip D:\HS3B\test.zip C:\Program Files (x86)\test1\* -mx5")
    And it doesnt work, it says directory invalid..



    does anyone know what i'm missing ?

    thanks in advance
    Last edited by Malosa; July 3, 2017, 12:37 PM. Reason: Solved
    Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
    Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




    HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

    #2
    Try this:
    Process.Start("CMD", ""/k 7zG a -tzip "D:\HS3B\test.zip"" ""C:\Program Files (x86)\test1\*"" -mx5"
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      Originally posted by Rupp View Post
      Try this:
      Process.Start("CMD", ""/k 7zG a -tzip "D:\HS3B\test.zip"" ""C:\Program Files (x86)\test1\*"" -mx5"
      hi RUPP

      thanks for the reply , but i get this error.

      Code:
      Jul-03 16:45:57	 	Error	Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\commandvb.vb: Comma, ')', or a valid expression continuation expected.
      Jul-03 16:45:57	 	Error	Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\commandvb.vb: 'k' is not declared. It may be inaccessible due to its protection level.
      Jul-03 16:45:57	 	Error	Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\commandvb.vb: Namespace or type specified in the Imports 'System.Core' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
      Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
      Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




      HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

      Comment


        #4
        How about:

        Process.Start("CMD", "/k 7zG a -tzip ""D:\HS3B\test.zip"" ""C:\Program Files (x86)\test1\*"" -mx5")


        Sent from my Phone using Tapatalk
        HS 4.2.8.0: 2134 Devices 1252 Events
        Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

        Comment


          #5
          Originally posted by sparkman View Post
          How about:

          Process.Start("CMD", "/k 7zG a -tzip ""D:\HS3B\test.zip"" ""C:\Program Files (x86)\test1\*"" -mx5").

          Sent from my Phone using Tapatalk

          Thanks for the reply,
          no error , but it starts the cmd but nothing happens
          Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
          Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




          HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

          Comment


            #6
            Need help with a command.

            Does something simpler like this work:

            Process.Start("CMD", "/k dir")


            Sent from my Phone using Tapatalk
            HS 4.2.8.0: 2134 Devices 1252 Events
            Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

            Comment


              #7
              hi Sparkman,

              it did work i had 1 space to much in the line.

              Thanks for the help!!!

              regards,








              Originally posted by sparkman View Post
              Does something simpler like this work:

              Process.Start("CMD", "/k dir")


              Sent from my Phone using Tapatalk
              Preferred -> Jon's Plugins, Pushover, Phlocation, Easy-trigger,
              Rfxcom, Blade Plugins, Pushbullet, homekit, Malosa Scripts




              HS3Pro 4.1.14.0 on windows 10 enterprise X64 on hp quadcore laptop 8 GB.

              Comment

              Working...
              X