Jump to content

Help with Comspec


Recommended Posts

Trying something still related to a previous post. Previous Post

I cannot find a way to make this work... Although I think it should. The (") after the "v" is needed as part of the command line.

RunWait (@ComSpec & ' /c C:\LogFiles\Resource_Scheduler\Source\RSO1100.exe /s /v"RSBASEURL=https://url.resourcescheduler.net/RSOEFR /passive)

 

Link to comment
Share on other sites

Try:
 

RunWait(@ComSpec & ' /c "' & 'C:\LogFiles\Resource_Scheduler\Source\RSO1100.exe"' & ' /s /v "' & 'RSBASEURL=https://url.resourcescheduler.net/RSOEFR /passive"')
;ShellExecuteWait('C:\LogFiles\Resource_Scheduler\Source\RSO1100.exe', '/s /v "' & 'RSBASEURL=https://url.resourcescheduler.net/RSOEFR /passive"')

 

Regards,
 

Link to comment
Share on other sites

21 minutes ago, jguinch said:

" and ' are missing after /passive :

RunWait (@ComSpec & ' /c C:\LogFiles\Resource_Scheduler\Source\RSO1100.exe /s /v"RSBASEURL=https://url.resourcescheduler.net/RSOEFR /passive"')

 

This worked like a charm thanks a lot!!! Testing if this fixes original issue now!!!

Link to comment
Share on other sites

2 hours ago, jguinch said:

Try ShellExecuteWait instead  (see #3), it should work

 

That's not working even running manually. It pops up a run dialogue box asking to run and then runs after I click ok but then just goes away. 

Link to comment
Share on other sites

  • Developers

Could it have to do with the fact that the WorkDir or the Environment variables (like Path) are different when shelled via SCCM under the System credentials?

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

I don't think so. Looking at the script I have made the locations static. Take a look...

#NoTrayIcon

$LogFilesDirectory = ("C:\LogFiles")
If FileExists($LogFilesDirectory) Then
   Else
      DirCreate("C:\LogFiles")
EndIf

;Install Notification
   MsgBox (48,"Resource Scheduler Outlook Client","OUTLOOK WILL CLOSE, DO NOT RELAUNCH UNTIL FINISHED",10)

;Close Outlook
   ProcessClose ("OUTLOOK.exe")

;Uninstall Resource Scheduler Outlook Client
   RunWait ("MsiExec.exe /x {7B207D64-D14A-4C05-A369-A13E914A1D34} /qb-!") ;Version 1050
   RunWait ("MsiExec.exe /x {081F2D54-90F1-4A7A-95DF-A27711BCD58B} /qb-!") ;Version 1100

;Copy Source files temporarly to LogFiles folder
   $Resource_Scheduler_Dir = ("C:\LogFiles\Resource_Scheduler")
   If FileExists ($Resource_Scheduler_Dir) Then
      Else
         DirCreate ("C:\LogFiles\Resource_Scheduler")
   EndIf

Sleep (500)

   DirCopy (@scriptDir, $Resource_Scheduler_Dir, 1)

Sleep (500)

;Install Resource Scheduler Outlook Client
   ;RunWait (@ScriptDir & '\Source\RSO1100.exe /s /v"RSBASEURL=https://url.resourcescheduler.net/RSOEFR /passive"')
   RunWait (@ComSpec & ' /c C:\LogFiles\Resource_Scheduler\Source\RSO1100.exe /s /v"RSBASEURL=https://url.resourcescheduler.net/RSOEFR /passive"')

;Completion Message
   MsgBox (48,"Resource Scheduler Outlook Client","Resource Scheduler Outlook Client - INSTALLATION COMPLETE!",10)

 

Link to comment
Share on other sites

  • Developers

Understood, but that doesn't mean that for example the last runwait() will work when the WorkDir isn't the script dir. have you tried setting the workdir to the script dir with FileChangeDir(@ScriptDir) just to be sure?  

What exactly is failing of the steps you have in the script? Is it just the RunWait() or also other things?

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

 

2 minutes ago, Jos said:

Understood, but that doesn't mean that for example the last runwait() will work when the WorkDir isn't the script dir. have you tried setting the workdir to the script dir with FileChangeDir(@ScriptDir) just to be sure?  

What exactly is failing of the steps you have in the script? Is it just the RunWait() or also other things?

Jos

The last runwait will not run when it is pushed out via sccm. It works perfectly if I right click run as admin, but if i push it out it just flashes and skips that line. All of my other apps for the last 8+ years have never had this issue.

Link to comment
Share on other sites

  • Developers

I am out of ideas other than the suggestion I made to try with setting the WorkDir. 

EDIT: in  case you see the shelled screen you could replace the /c with /k to see if there is an error shown in the CMD window.

Jos 

Edited by 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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...