Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reg file enters incorrect entries, but only from Foxpro
Message
De
30/10/2007 23:45:40
 
 
À
30/10/2007 12:12:51
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01265070
Message ID:
01265264
Vues:
10
>If I run a batch file directly it enters the correct entries, but if I run it from within Foxpro, it does not. The values of BackupDirectory, DataDirectory and PromptDirectory are different, and they are different in the resulting REG file. If I run the BAT or REG file outside of Foxpro, they work great. If I run from inside Foxpro (like I am below with the RUN command, then all three get the value assigned to the BackupDirectory in the registry. What could be causing this? Thanks!
>
>
>
>* Do NOT indent (or use Beautify on) these TEXT/ENDTEXT blocks as it will mess up the results
>TEXT to m.RegCommands TEXTMERGE NOSHOW
>REGEDIT4
><<m.InstallHKey>>
>"AppDirectory"="<<m.InstallAppDirectory>>"
>"Application"="<<m.InstallApplication>>"
>"HostName"="<<m.DefaultHostName>>"
>"Port"="<<m.DefaultPort>>"
>"BackupDirectory"="<<m.DefaultBackupDirectory>>"
>"DataDirectory"="<<m.DefaultDataDirectory>>"
>"PromptDirectory"="<<m.DefaultPromptDirectory>>"
>"Switch"="<<m.DefaultSwitch>>"
>ENDTEXT
>
>	* Create the REG file
>	m.RegFilename = '"' + JUSTPATH(application.servername) + [\EMPS.REG] + '"'
>	STRTOFILE(m.RegCommands,m.RegFilename)
>
>	* Initialize the variable that will hold the BAT file commands
>	m.InstallBatchCommands = ''
>
>* Do NOT indent (or use Beautify on) these TEXT/ENDTEXT blocks as it will mess up the results
>TEXT to m.InstallBatchCommands TEXTMERGE NOSHOW
>NET STOP EMPS
>SC delete "EMPS"
><<m.instsrvFilename>> "EMPS" <<m.srvanyFilename>>
>REGEDIT.EXE /S <<m.RegFilename>>
>ENDTEXT
>
>	* Create the BAT file
>	m.InstallBatchFilename = '"' + JUSTPATH(application.servername) + '\EMPS_Install.bat' + '"'
>	STRTOFILE(m.InstallBatchCommands,m.InstallBatchFilename)
>
>	* Run the BAT file
>	RUN /N &InstallBatchFilename
>
>	* Give the batch file time to run
>	m.TimePause = DATETIME() + 3
>	DO WHILE DATETIME() < m.TimePause && Wait 3 seconds...
>	ENDDO
>
Just a SWAG - could you try name resolution instead of macro substitution?
RUN /N ( m.InstallBatchFilename )
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform