Jump to content
Sign in to follow this  
GAM

File path

Recommended Posts

Hi, Am trying to pass the folder path in the RUN function but its not working, its giving me no result. The code snippet is...

----------------------------------------------------------------------------

$FolderPath = """C:\Program Files (x86)\MyProduct\ABC Enterprise"""

Run(@ComSpec & " /c " & """" & @ScriptDir & "\" & "sigcheck.exe""" & " -a -s -q -v " & "" & $FolderPath & "" & " >> " & @ScriptDir & "\Precheck\" & "sigcheck.txt", "", @SW_HIDE)

----------------------------------------------------------------------------

If I give the path directly in the RUN function then it works...like below...

Run(@ComSpec & " /c " & """" & @ScriptDir & "\" & "sigcheck.exe""" & " -a -s -q -v " & "C:\Test" & " >> " & @ScriptDir & "\Precheck\" & "sigcheck.txt", "", @SW_HIDE)

Can someone help please?

Share this post


Link to post
Share on other sites

Thanks for the reply...

I have tried as you have suggested but it still didnt work..This is what I have tried...

Run(@ComSpec & " /c " & '"' & @ScriptDir & "" & "sigcheck.exe" & '"' & " -a -s -q -v " & '"' & $FolderPath & '"' & " >> " & '"' & @ScriptDir & "Precheck" & "sigcheck.txt" & '"', "", @SW_HIDE)

Share this post


Link to post
Share on other sites

I have tried this...didnt work...

$FolderPath = '"' & "C:Program Files (x86)MyProductABC Enterprise" & '"'

Run(@ComSpec & " /c " & '"' & @ScriptDir & "" & "sigcheck.exe" & '"' & " -a -s -q -v " & $FolderPath & " >> " & '"' & @ScriptDir & "Precheck" & "sigcheck.txt" & '"', "", @SW_HIDE)

Share this post


Link to post
Share on other sites

The string doesn't look bad. Replace /c with /k so the DOS window stays open and you can see error messages that might appear.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I have tried this...didnt work...

$FolderPath = '"' & "C:Program Files (x86)MyProductABC Enterprise" & '"'

Run(@ComSpec & " /c " & '"' & @ScriptDir & "" & "sigcheck.exe" & '"' & " -a -s -q -v " & $FolderPath & " >> " & '"' & @ScriptDir & "Precheck" & "sigcheck.txt" & '"', "", @SW_HIDE)

Run(@ComSpec & " /c " & @ScriptDir & "sigcheck.exe -a -s -q -v " & $FolderPath & " >> " & @ScriptDir & "Prechecksigcheck.txt", "", @SW_HIDE)

Okay, i hope this works if i read it correctly.

Share this post


Link to post
Share on other sites

Sorry for the confusion, here is what I'm trying to get the output...

1) I have a tool called "Sigcheck.exe" (this is under the same location "Mc Internals" on desktop where am running my autoit script)

2) The path that I want to check for the target location is "C:Program Files (x86)MyProductABC Enterprise".

3) The command that I want to run is ...

[cmd prompt]"sigcheck.exe" -a -s -q -v "C:Program Files (x86)My ProductABCEnterprise" >> "C:UsersAshuDesktopMc InternalsPrecheck"sigcheck.txt"

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...