Jump to content

Recommended Posts

Hope someone can help as quotes within quotes is always confusing.  I am creating a silent install of printer software and want to call via runwait comspec line.

The call within a cmd line is below

samsung.exe /s /n"Samsung SL-M3220ND" /p"xxx"

xxx will be stored as a variable  $PrinterIP which would be as example  10.10.10.20    I need to use a variable as i am doign this for a business and need it to be based on the store i install at that has a specific IP range.

 

I started with the below as 2 possibilities but no luck..

RunWait(@ComSpec & "/c " & "samsung.exe /s /n""Samsung SL-M3220ND"" /p""" & $PrinterIP ")



RunWait(@ComSpec & "/c " & "samsung.exe /s /n'Samsung SL-M3220ND' /p'" & $PrinterIP '")

but i cant get it to compile as i have errors on the line..  thanks in advance.

Link to comment
Share on other sites

Try this:

RunWait(@ComSpec & ' /c samsung.exe /s /n "Samsung SL-M3220ND" /p"' & $PrinterIP & '"')

 

Edited by jchd
Forgot a whitespace as Jos pointed out. (Oops!)

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

  • Moderators

Moved to the appropriate forum, as the DEV forum very clearly states:

Quote

Do not create AutoIt-related topics here, use AutoIt General Help and Support

We even bolded it...

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Developers
14 hours ago, goodmanjl531 said:

I started with the below as 2 possibilities but no luck..

RunWait(@ComSpec & "/c " & "samsung.exe /s /n""Samsung SL-M3220ND"" /p""" & $PrinterIP ")



RunWait(@ComSpec & "/c " & "samsung.exe /s /n'Samsung SL-M3220ND' /p'" & $PrinterIP '")

but i cant get it to compile as i have errors on the line..  thanks in advance.

 

13 hours ago, jchd said:

Try this:

RunWait(@ComSpec & '/c samsung.exe /s /n "Samsung SL-M3220ND" /p"' & $PrinterIP & '"')

 

You guys are missing a space in front of the /c which for sure makes them fail.  ;)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Thanks, fixed.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...